Added in API level 1

SimpleStringSplitter


open class SimpleStringSplitter : TextUtils.StringSplitter, MutableIterator<String!>
kotlin.Any
   ↳ android.text.TextUtils.SimpleStringSplitter

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", "".

Summary

Public constructors

Initializes the splitter.

Public methods
open Boolean

open MutableIterator<String!>

open String!

open Unit

open Unit
setString(string: String!)

Sets the string to split

Public constructors

SimpleStringSplitter

Added in API level 1
SimpleStringSplitter(delimiter: Char)

Initializes the splitter. setString may be called later.

Parameters
delimiter Char: the delimeter on which to split

Public methods

hasNext

Added in API level 1
open fun hasNext(): Boolean
Return
Boolean true if the iteration has more elements

iterator

Added in API level 1
open fun iterator(): MutableIterator<String!>
Return
MutableIterator<String!> an Iterator.

next

Added in API level 1
open fun next(): String!
Return
String! the next element in the iteration
Exceptions
java.util.NoSuchElementException if the iteration has no more elements

remove

Added in API level 1
open fun remove(): Unit
Exceptions
java.lang.UnsupportedOperationException if the remove operation is not supported by this iterator
java.lang.IllegalStateException if the next method has not yet been called, or the remove method has already been called after the last call to the next method

setString

Added in API level 1
open fun setString(string: String!): Unit

Sets the string to split

Parameters
string String!: the string to split