public static String cut(String line,IntPredicate testFunction){
  String s="";
  int pos=SubParser.locate(line,testFunction);
  if (pos != -1) {
    s=line.substring(0,pos);
  }
  return s;
}

public static String cut ( String line , IntPredicate testFunction ) { String s = "" ; int pos = SubParser . locate ( line , testFunction ) ; if ( pos != - 1 ) { s = line . substring ( 0 , pos ) ; } return s ; }
cuts the string from the beginning until the testfunction predicates .
