method to get rid of leading white space code example
Example: how to strip trailing spaces in java
String str = new String(" apples ");
str.trim(); // result is a nes string "apple"
String str = new String(" apples ");
str.trim(); // result is a nes string "apple"