public static String removeLeadingZeros(final String str){
  String result=str;
  if (str != null && str.length() != 0) {
    int startIndex=0;
    while (startIndex < str.length() - 1) {
      final char ch=str.charAt(startIndex);
      if (ch != '0') {
        break;
      }
      startIndex++;
    }
    if (startIndex > 0) {
      result=str.substring(startIndex);
    }
  }
  return result;
}

public static String removeLeadingZeros ( final String str ) { String result = str ; if ( str != null && str . length ( ) != 0 ) { int startIndex = 0 ; while ( startIndex < str . length ( ) - 1 ) { final char ch = str . charAt ( startIndex ) ; if ( ch != '0' ) { break ; } startIndex ++ ; } if ( startIndex > 0 ) { result = str . substring ( startIndex ) ; } } return result ; }
remove leading zeros from string .
