TextUtils.SimpleStringSplitter

public static class TextUtils.SimpleStringSplitter extends Object
implements TextUtils.StringSplitter Iterator<String>

A simple string splitter.

If the final character in the string to split is the delimiter then no empty string will be returned for the empty string after that delimeter. That is, splitting "a,b," on comma will return "a", "b", not "a", "b", "".

Public Constructor Summary

TextUtils.SimpleStringSplitter(char delimiter)
Initializes the splitter.

Public Method Summary

boolean
Iterator<String>
String
next()
void
remove()
void
setString(String string)
Sets the string to split

Inherited Method Summary

Public Constructors

public TextUtils.SimpleStringSplitter (char delimiter)

Initializes the splitter. setString may be called later.

Parameters
delimiter the delimeter on which to split

Public Methods

public boolean hasNext ()

public Iterator<String> iterator ()

public String next ()

public void remove ()

public void setString (String string)

Sets the string to split

Parameters
string the string to split