Strings (dw::core::Strings)
This module contains helper functions for working with strings.
To use this module, you must import it to your DataWeave code, for example,
by adding the line import * from dw::core::Strings
to the header of your
DataWeave script.
Functions
Name | Description |
---|---|
Appends the |
|
Returns a string in camel case based on underscores in the string. |
|
Capitalizes the first letter of each word in a string. |
|
Returns the Unicode for the first character in an input string. |
|
Returns the Unicode for a character at the specified index. |
|
Collapses the string into substrings of equal characters. |
|
Counts the number of times an expression that iterates through
each character in a string returns |
|
Counts the number of matches in a string. |
|
Replaces spaces, underscores, and camel-casing in a string with dashes (hyphens). |
|
Checks whether a condition is valid for every character in a string. |
|
Returns characters from the beginning of a string to the specified number of characters in the string, for example, the first two characters of a string. |
|
Returns a character that matches the specified Unicode. |
|
Returns the Hamming distance between two strings. |
|
Checks if the |
|
Checks if the |
|
Checks if the |
|
Checks if the |
|
Checks if the |
|
Checks if the |
|
Returns characters from the end of string to a specified number of characters, for example, the last two characters of a string. |
|
The specified |
|
Returns the Levenshtein distance (or edit distance) between two strings. |
|
Returns an array of lines from a string. |
|
Applies an expression to every character of a string. |
|
Returns a number as an ordinal, such as |
|
Pluralizes a singular string. |
|
Prepends the |
|
Removes all occurrences of a specified pattern from a string. |
|
Repeats a |
|
Replaces all substrings that match a literal search string with a specified replacement string. |
|
Reverses sequence of characters in a string. |
|
The specified |
|
Converts a plural string to its singular form. |
|
Checks whether a condition is valid for at least one of the characters or blank spaces in a string. |
|
Returns a substring that spans from the character at the
specified |
|
Gets the substring after the first occurrence of a separator. The separator is not returned. |
|
Gets the substring after the last occurrence of a separator. The separator is not returned. |
|
Gets the substring before the first occurrence of a separator. The separator is not returned. |
|
Gets the substring before the last occurrence of a separator. The separator is not returned. |
|
Splits a string at each character where the |
|
Splits a string into an array of substrings equal to a specified length. |
|
Replaces hyphens, spaces, and camel-casing in a string with underscores. |
|
Unwraps a given |
|
Checks that the string length is no larger than the specified |
|
Returns an array of words from a string. |
|
Wraps |
|
Wraps the specified |