Build a copy of the given string, replacing some chars by replacement strings.
Build a copy of the given string, replacing some chars by replacement strings. The replacement array is indexed by character value. Only characters for which the replacement array contains a non-null value will be replaced.
TODO: don't double-escape existing escape sequences
TODO: This method cannot replace code points > 0xFFFF.
If null, the method may return null or a new StringBuilder. Otherwise, the method will return the given target.
mapping from characters to replacement strings.
null if target was null and no characters had to be escaped
Build a copy of the given string, replacing some chars by replacement strings.
Build a copy of the given string, replacing some chars by replacement strings. The replacement array is indexed by character value. Only characters for which the replacement array contains a non-null value will be replaced.
TODO: don't double-escape existing escape sequences
TODO: This method cannot replace code points > 0xFFFF.
input string
mapping from characters to replacement strings.
new string if characters had to be escaped, input string otherwise
Build a copy of the first string in which all occurrences of chars from the third string have been converted to UTF-8 hex escapes where each two-digit hex byte is prefixed by the given escape character.
Build a copy of the first string in which all occurrences of chars from the third string have been converted to UTF-8 hex escapes where each two-digit hex byte is prefixed by the given escape character.
This method is pretty inefficient. If it is repeatedly used with the same chars, you should use replacements() and escape() below.
TODO: don't double-escape existing escape sequences
TODO: This method cannot replace code points > 0xFFFF.
If null, the method may return null or a new StringBuilder. Otherwise, the method will return the given target.
null if target was null and no characters had to be escaped
Caclulate the MD5 sum of the input String
Caclulate the MD5 sum of the input String
the string we want to calculate the MD5 sum for
the md5sum hash of the input string
Displays minutes, seconds and milliseconds.
Build a copy of the given string in which all occurrences of chars from the second string have been replaced by the corresponding char from the third string.
Build a copy of the given string in which all occurrences of chars from the second string have been replaced by the corresponding char from the third string. If there is no corresponding char (i.e. the third string is shorter than the second one), the affected char is removed.
TODO: This method cannot replace code points > 0xFFFF.
If null, the method may return null or a new StringBuilder. Otherwise, the method will return the given target.
list of replaced characters
list of replacement characters
null if target was null and no characters had to be escaped
Produces a replacement array that can be used for escape() below.
Produces a replacement array that can be used for escape() below. Call this method once, save its result and use it to call escape() below repeatedly.
highest allowed code point. Safety catch - if someone gave us a string containing a very high code point, we would allocate an array whose length is that code point. If that is desired, at least force the user to make it explicit.