public static String[] split(String toSplit,String delimiter){
  if (!hasLength(toSplit) || !hasLength(delimiter)) {
    return null;
  }
  int offset=toSplit.indexOf(delimiter);
  if (offset < 0) {
    return null;
  }
  String beforeDelimiter=toSplit.substring(0,offset);
  String afterDelimiter=toSplit.substring(offset + delimiter.length());
  return new String[]{beforeDelimiter,afterDelimiter};
}

public static String [ ] split ( String toSplit , String delimiter ) { if ( ! hasLength ( toSplit ) || ! hasLength ( delimiter ) ) { return null ; } int offset = toSplit . indexOf ( delimiter ) ; if ( offset < 0 ) { return null ; } String beforeDelimiter = toSplit . substring ( 0 , offset ) ; String afterDelimiter = toSplit . substring ( offset + delimiter . length ( ) ) ; return new String [ ] { beforeDelimiter , afterDelimiter } ; }
split a string at the first occurrence of the delimiter . does not include the delimiter in the result .
