class StringTools
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.
Class Fields
static function hex(n:Int, ?digits:Int = null): String
Encodes n
into a hexadecimal representation.
If digits
is specified, the resulting String is padded with "0" until
its length equals digits
.
static function startsWith(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.