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

staticlpad (s:String, c:String, l:Int):String

Concatenates c to s until s.length is at least l.

If c is the empty String "" or if l does not exceed s.length, s is returned unchanged.

If c.length is 1, the resulting String length is exactly l.

Otherwise the length may exceed l.

If c is 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.