Is there some easy way to pad Strings in Java?
Seems like something that should be in some StringUtil-like API, but I can't find anything that does this.
How can I convert a String to an int in Java?
My String contains only numbers, and I want to return the number it represents.
For example, given the string "1234" the result should be the number 1234.
I have a string, "004-034556", that I want to split into two strings:
string1="004";
string2="034556";
That means the first string will contain the characters before '-', and the second string will contain the characters after '-'. I also want to …