Skip to content

Static Methods

Gavin-Song edited this page Feb 18, 2018 · 2 revisions

Remember: All String methods are also copied over (Any String method that previously returned String now returns SuperString)

escapeRegex(String regex)

Escapes the regex with slashes. Example:

SuperString.escapeRegex("\\d+"); // "\\d\+"

StringArrToSuperStringArr

Converts a String[] to a SuperString[]

SuperStringArrToStringArr

Converts a SuperString[] to a String[]

toSentence(String... words)

Takes an array of words and converts it to an english sentence. Example:

SuperString.toSentence("flour", "eggs", "bread"); // "flour, eggs, and bread"

Clone this wiki locally