Here you can find the source of unpadZeroString(String string)
public static final String unpadZeroString(String string)
//package com.java2s; /**//from w ww .j a v a2 s. co m * Converts a line of text into an array of lower case words using a * BreakIterator.wordInstance(). <p> * * This method is under the Jive Open Source Software License and was * written by Mark Imbriaco. * * @param text a String of text to convert into an array of words * @return text broken up into an array of words. */ public class Main { private static final char[] zeroArray = "0000000000000000".toCharArray(); public static final String unpadZeroString(String string) { if (string == null) { return string; } StringBuffer buf = new StringBuffer(string); while (buf.charAt(0) == zeroArray[0]) { buf = buf.deleteCharAt(0); } //buf.substring(,string.length()-1); return buf.toString(); } }