public static String removeSlashFromBeginning(String string){
  if (string != null && !string.equals("") && string.charAt(0) == '/') {
    return string.substring(1,string.length());
  }
  return string;
}

public static String removeSlashFromBeginning ( String string ) { if ( string != null && ! string . equals ( "" ) && string . charAt ( 0 ) == '/' ) { return string . substring ( 1 , string . length ( ) ) ; } return string ; }
removes slash from the beginning if necessary .
