Wednesday, June 26, 2019

java - A better way of left padding a string with zeroes

This is how I left pad a string with zeroes:



String.format("%16s", cardTypeString.trim()).replace(' ', '0');



Is there a better way to do this? I don't like the .replace(' ', '0') part.

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...