Cast a string value to an internal type.
Returns true if a conversion exists for the specified class.
Returns the name of the reference point for relative dates.
Returns the name of the reference point for relative dates. For example, with the
relative date now-5m
, it would return now
.
Hex decode an input string.
Hex decode an input string.
Input string to decode.
Character used to indicate the start of a hex encoded symbol.
Decoded string.
Returns true if a date string is relative.
Returns true if a date string is relative. If custom ref is true it will check if it is a relative date against a custom reference point other than now or the epoch.
Returns true if a date string is relative.
Parse a color expressed as a hexadecimal RRGGBB string.
Return the time associated with a given string.
Return the time associated with a given string.
- now, n: - start, s: - end, e: - epoch:
- seconds, s: - minutes, m: - hours, h: - days, d: - weeks, w: - months - years, y:
Return the time associated with a given string.
Return the time associated with a given string. The time will be relative
to now
.
Parse a string that follows the ISO8601 spec or at
time range spec
into a period object.
Returns a map corresponding to the URL query parameters in the string.
Strip the margin from multi-line strings.
Substitute variables into a string.
Substitute variables from the map into a string.
Substitute variables from the map into a string. If a key used in the input string is not set, then the key will be used as the value.
Parse start and end time strings that can be relative to each other and resolve to precise instants.
Parse start and end time strings that can be relative to each other and resolve to precise instants.
Start time string in a format supported by parseDate
.
End time string in a format supported by parseDate
.
Time zone to assume for the times if a zone is not explicitly specified. Defaults to UTC.
Tuple start -> end
.
Returns a string representation of a period.
Lenient url-decoder.
Lenient url-decoder. The URLDecoder class provided in the jdk throws if there is an invalid hex encoded value. This function will map invalid encodes to a %25 (a literal percent sign) and then decode it normally.
Lenient url-encoder.
Lenient url-encoder. The URLEncoder class provided in the jdk is eager to percent encode making atlas expressions hard to read. This version assumes the only escaping necessary for '%', '&', '+', '?', '=', and ' '.
Convert integer represented as a byte array to a hex string and zero pad.
Convert integer represented as a byte array to a hex string and zero pad. This can be used to avoid a conversion to BigInteger if the hex string is the only result needed. The minimum padding width is 2, smaller values will get ignored.
Convert BigInteger value to hex string and zero pad.
Convert long value to hex string and zero pad.
Convert long value to hex string and zero pad. It is intended for positive values and the integer value will be treated as unsigned.
Convert integer value to hex string and zero pad.
Convert integer value to hex string and zero pad. It is intended for positive values and the integer value will be treated as unsigned.
Left pad the input string with zeros to the specified width.
Left pad the input string with zeros to the specified width. This is
typically used as an alternative to performing zero padding using
String.format
.
(Since version ) see corresponding Javadoc for more information.
Helper functions for working with strings.