This class provides advanced methods on Strings. It is ideally used with using StringTools and then acts as an extension to the String class.

If the first argument to any of the methods is null, the result is unspecified.

Static methods

staticendsWith (s:String, end:String):Bool

Tells if the string s ends with the string end.

If end is null, the result is unspecified.

If end is the empty String "", the result is true.

staticreplace (s:String, sub:String, by:String):String

Replace all occurrences of the String sub in the String s by the String by.

If sub is the empty String "", by is inserted after each character of s except the last one. If by is also the empty String "", s remains unchanged.

If sub or by are null, the result is unspecified.

staticstartsWith (s:String, start:String):Bool

Tells if the string s starts with the string start.

If start is null, the result is unspecified.

If start is the empty String "", the result is true.