public SimpleString[] split(final char delim){
  List<SimpleString> all=null;
  byte low=(byte)(delim & 0xFF);
  byte high=(byte)(delim >> 8 & 0xFF);
  int lasPos=0;
  for (int i=0; i < data.length; i+=2) {
    if (data[i] == low && data[i + 1] == high) {
      byte[] bytes=new byte[i - lasPos];
      System.arraycopy(data,lasPos,bytes,0,bytes.length);
      lasPos=i + 2;
      if (all == null) {
        all=new ArrayList<>(2);
      }
      all.add(new SimpleString(bytes));
    }
  }
  if (all == null) {
    return new SimpleString[]{this};
  }
 else {
    byte[] bytes=new byte[data.length - lasPos];
    System.arraycopy(data,lasPos,bytes,0,bytes.length);
    all.add(new SimpleString(bytes));
    SimpleString[] parts=new SimpleString[all.size()];
    return all.toArray(parts);
  }
}

public SimpleString [ ] split ( final char delim ) { List < SimpleString > all = null ; byte low = ( byte ) ( delim & 0xFF ) ; byte high = ( byte ) ( delim > > 8 & 0xFF ) ; int lasPos = 0 ; for ( int i = 0 ; i < data . length ; i += 2 ) { if ( data [ i ] == low && data [ i + 1 ] == high ) { byte [ ] bytes = new byte [ i - lasPos ] ; System . arraycopy ( data , lasPos , bytes , 0 , bytes . length ) ; lasPos = i + 2 ; if ( all == null ) { all = new ArrayList < > ( 2 ) ; } all . add ( new SimpleString ( bytes ) ) ; } } if ( all == null ) { return new SimpleString [ ] { this } ; } else { byte [ ] bytes = new byte [ data . length - lasPos ] ; System . arraycopy ( data , lasPos , bytes , 0 , bytes . length ) ; all . add ( new SimpleString ( bytes ) ) ; SimpleString [ ] parts = new SimpleString [ all . size ( ) ] ; return all . toArray ( parts ) ; } }
splits this simplestring into an array of simplestring using the char param as the delimiter . i . e . " a . b " would return " a " and " b " if . was the delimiter
