Determines whether a string ends with the characters of a specified string, optionally limiting the check to the first N characters.
The string to check.
The characters to search for at the end.
Optionallength: numberOptional length of the string to consider.
true if the string ends with the search string, false otherwise.
Checks if a string contains a specified substring, optionally starting the search at a given position.
The string to search within.
The substring to search for.
Optionalposition: numberOptional position to start searching from.
true if the substring is found, false otherwise.
Returns the index of the first occurrence of a specified substring in a string, or -1 if not found.
The string to search within.
The substring to search for.
OptionalfromIndex: numberOptional index to start searching from.
The index of the first occurrence, or -1.
Returns the index of the last occurrence of a specified substring in a string, or -1 if not found.
The string to search within.
The substring to search for.
OptionalfromIndex: numberOptional index to start searching backward from.
The index of the last occurrence, or -1.
Pads the end of a string with a given pad string (repeated if needed) until the resulting string reaches the specified maximum length.
The string to pad.
The target length of the resulting string.
OptionalpadString: stringThe string to pad with (defaults to spaces).
The padded string.
Pads the start of a string with a given pad string (repeated if needed) until the resulting string reaches the specified maximum length.
The string to pad.
The target length of the resulting string.
OptionalpadString: stringThe string to pad with (defaults to spaces).
The padded string.
Creates a new string by repeating the given string a specified number of times. The count must be a non-negative finite number.
The string to repeat.
The number of times to repeat (must be >= 0 and finite).
The repeated string.
Replaces the first occurrence of a search value (string or RegExp) in a string with a replacement string.
The string to search within.
The value to search for.
The replacement string.
The string with the first match replaced.
Searches a string for a match against a regular expression and returns the index of the first match, or -1 if no match is found.
The string to search within.
The regular expression to search for.
The index of the first match, or -1.
Extracts a section of a string and returns it as a new string, without modifying the original.
The string to extract from.
Optionalstart: numberThe zero-based start index (inclusive).
Optionalend: numberThe zero-based end index (exclusive).
The extracted substring.
Determines whether a string begins with the characters of a specified string, optionally starting the check at a given position.
The string to check.
The characters to search for at the start.
Optionalposition: numberOptional position to begin searching from.
true if the string starts with the search string, false otherwise.
Returns a portion of a string between the specified start and end
indices. Unlike slice, negative indices are treated as 0 and arguments
are swapped if start is greater than end.
The string to extract from.
The start index (inclusive).
Optionalend: numberThe end index (exclusive).
The extracted substring.
Provides string manipulation functions for use in HotMesh mapping rules. Although inspired by JavaScript's String API, these methods follow a functional approach where each transformation expects one or more input parameters from the prior row in the
@pipestructure.Remarks
Methods are invoked with the syntax
{@string.<method>}, e.g.,{@string.trim}or{@string.toUpperCase}.