splitOn

fun String.splitOn(separator: (Char) -> Boolean): Pair<String, String>

Return a Pair containing the start of the given string up to the first separator character, followed by the rest of the string. If the separator character wasn't found, the returned Pair will contain the entire string as the first element, followed by the empty string.

Return

Pair containing the split string.

Parameters

separator

Separator character to split on.