code: public Collection<Text> split(Text separator) {
      	ArrayList<Text> tokens = new ArrayList<Text>();
      	int pointer = pos;
          int limit = pos + len;
          int mark = pointer;
          
          if(separator.length()==0)
      	{
          	tokens.add(new Text(chars, mark, pointer - mark));
      		return tokens;
      	}
      	
          int index=0;
          while (pointer < limit) {
              if (chars[pointer] == separator.charAt(index))
                  index++;
              else 
              	index=0;
                          
              if(index==separator.length())
              {
              	tokens.add(new Text(chars, mark, pointer - mark));
                  mark = pointer + 1;
                  index=0;
              }
              
              pointer++;                    
          }
          
          tokens.add(new Text(chars, mark, limit - mark));        
          return tokens;
      }
docs: Splits text into partitions.
  
  @param separator character used for partitioning
  @return array of text strings.