Strings
Helper functions for working with strings.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Strings.type
Members list
Value members
Concrete methods
Cast a string value to an internal type.
Cast a string value to an internal type.
Attributes
Returns true if a conversion exists for the specified class.
Returns true if a conversion exists for the specified class.
Attributes
Returns the name of the reference point for relative dates. For example, with the relative date now-5m
, it would return now
.
Returns the name of the reference point for relative dates. For example, with the relative date now-5m
, it would return now
.
Attributes
Hex decode an input string.
Hex decode an input string.
Value parameters
- escapeChar
-
Character used to indicate the start of a hex encoded symbol.
- input
-
Input string to decode.
Attributes
- Returns
-
Decoded string.
Returns true if a date string is relative.
Returns true if a date string is relative.
Attributes
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. 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.
Attributes
Parse a color expressed as a hexadecimal RRGGBB string.
Parse a color expressed as a hexadecimal RRGGBB string.
Attributes
Return the time associated with a given string. Times can be relative to a reference point using syntax <ref><+/-><duration>
. Supported references points are s
, e
, now
, and epoch
. See parseDuration
for more details about durations.
Return the time associated with a given string. Times can be relative to a reference point using syntax <ref><+/-><duration>
. Supported references points are s
, e
, now
, and epoch
. See parseDuration
for more details about durations.
Attributes
Parse a string that follows the ISO8601 spec or at
time range spec into a period object.
Parse a string that follows the ISO8601 spec or at
time range spec into a period object.
Attributes
Returns a map corresponding to the URL query parameters in the string.
Returns a map corresponding to the URL query parameters in the string.
Attributes
Strip the margin from multi-line strings.
Strip the margin from multi-line strings.
Attributes
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.
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.
Attributes
Substitute variables into a string.
Substitute variables into a string.
Attributes
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.
Value parameters
- e
-
End time string in a format supported by
parseDate
. - s
-
Start time string in a format supported by
parseDate
. - tz
-
Time zone to assume for the times if a zone is not explicitly specified. Defaults to UTC.
Attributes
- Returns
-
Tuple
start -> end
.
Returns a string representation of a period.
Returns a string representation of a period.
Attributes
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-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.
Attributes
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 ' '.
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 ' '.
Attributes
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
.
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
.
Attributes
Convert integer 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. It is intended for positive values and the integer value will be treated as unsigned.
Attributes
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 long value to hex string and zero pad. It is intended for positive values and the integer value will be treated as unsigned.
Attributes
Convert BigInteger value to hex string and zero pad.
Convert BigInteger value to hex string and zero pad.
Attributes
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 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.