public static String trimLeadingCharacter(String str,char leadingCharacter){
  if (!hasLength(str)) {
    return str;
  }
  StringBuilder sb=new StringBuilder(str);
  while (sb.length() > 0 && sb.charAt(0) == leadingCharacter) {
    sb.deleteCharAt(0);
  }
  return sb.toString();
}

public static String trimLeadingCharacter ( String str , char leadingCharacter ) { if ( ! hasLength ( str ) ) { return str ; } StringBuilder sb = new StringBuilder ( str ) ; while ( sb . length ( ) > 0 && sb . charAt ( 0 ) == leadingCharacter ) { sb . deleteCharAt ( 0 ) ; } return sb . toString ( ) ; }
trim all occurrences of the supplied leading character from the given string .
