The Types of Data chapter of the Scripting Guide provides more details about some of the functions.
Optional quoted string that specifies an encoding. Supported encodings are: "utf-8", "utf-16le", "utf-16be", "us-ascii", "iso-8859-1", and "ascii-hex".
The optional argument ascii is intended to make conversions of blobs containing normal ASCII data simpler when the data might contain CR, LF, or TAB characters (for example) and those characters do not need any special attention.
"big" indicates that the first byte is the most significant.
"little" indicates that the first byte is the least significant.
"native" indicates that the machine’s native format should be used.
an expression or a numeric value. An expression must be quoted with Expr(). Otherwise, its evaluated value is converted to a string.
The width argument overrides the decimal argument.
Optional quoted string that specifies an encoding. Supported encodings are: "utf-8", "utf-16le", "utf-16be", "us-ascii", "iso-8859-1", and "ascii-hex".
Optional quoted string that specifies an encoding. The default encoding supported for the hex code is "utf-8". You can also specify one of these encodings: "utf-16le", "utf-16be", "us-ascii", "iso-8859-1", "ascii-hex", "shift-jis", and "euc-jp".
For strings: Appends the string b to the string a. Neither argument is changed.
For lists: Appends the list b to the list a. Neither argument is changed.
For strings: A string composed of the string a directly followed by the string b.
For lists: A list composed of the list a directly followed by the list b.
For strings: Appends the string b to the string a and places the new concatenated string into a.
For matrices: Appends the matrix b to the matrix a and places the new concatenated matrix into a.
For strings: A string composed of the string a directly followed by the string b.
Determines whether part is contained within whole.
If part is found: For lists, strings, and namespaces, the numeric position where the first occurrence of part is located. For associative arrays, 1.
If part is not found, 0 is returned in all cases.
For a string or namespace, a string that can be part of the string whole. For a list, an item that can be an item in the list whole. For an associative array, a key that can be one of the keys in the map whole.
An optional numeric argument that specifies a starting point. within whole. If start is negative, contains searches whole for part backwards, beginning with the position specified by the length of wholestart. Note that start is meaningless for associative arrays and is ignored.
Determines whether substring appears at the end of string.
1 if string ends with substring, otherwise 0.
Converts the quoted hexadecimal string (including whitespace characters) to a blob (binary large object).
Converts the quoted hexadecimal string to its character equivalent.
Hex To Char ("30") results in “0”.
Converts the quoted hexadecimal string to its integer or its floating number equivalent.
Inserts a new item into the source at the given position. If position is not given, item is added to the end.
For an associative array: Adds the key into the source associative array and assigns value to it. If the key exists in source already, its value is overwritten with the new value.
Any value to be placed within source. For an associative array, key might or might not be present in source.
Inserts a new item into the source at the given position in place. The source must be an L-value.
Any value to be placed within source. For an associative array, key might or might not be present in source.
Extracts the nth word from a quoted string according to the quoted string delimiters given. The default delimiter is space. If you include a third argument, any and all characters in that argument are taken to be delimiters.
Item() is the same as Word() except that Item() treats each delimiter character as a separate delimiter, and Word() treats several adjacent delimiters as a single delimiter.
Returns a truncated or padded version of the original string or list. The result contains the left n characters or list items, padded with any filler on the right if the length of string is less than n.
Converts any upper case character found in quoted string to the equivalent lowercase character.
Computes new character strings from the quoted string by inserting or deleting characters. It can also produce substrings, calculate indexes, and perform other tasks depending on how you specify its arguments.
Offset is a numeric expression indicating the starting position to search in the string. If the offset is greater than the position of the first instance of the find argument, the first instance is disregarded. If the offset is greater than the search string’s length, Munger uses the string’s length as the offset.
Searches for the pattern within the source string.
Optional. A backreference to the capturing group. The default is \0, which is the entire matched string. \n returns the nth match.
Deletes the n item(s), starting from the indicated position. If n is omitted, the item at position is deleted. If position and n are omitted, the item at the end is removed. For an associative array: Deletes the key and its value.
A copy of the source with the items deleted.
Deletes the n item(s) in place, starting from the indicated position. If n is omitted, the item at position is deleted. If position and n are omitted, the item at the end is removed. For an associative array: Deletes the key and its value. The source must be an L-value.
The original source with the items deleted.
Returns a copy of source concatenated with itself a times. Or returns a matrix composed of a row repeats and b column repeats. The source can be text, a matrix, or a list.
Returns a truncated or padded version of the original string or list. The result contains the right n characters or list items, padded with any filler on the left if the length of string is less than n.
Shifts an item or n items from the front to the back of the source.
Optional. An integer that specifies the number of items to shift. Positive values shift items from the beginning of the source to the end. Negative values shift items from the end of the source to the beginning. The default value is 1.
Optional. An integer that specifies the number of items to shift. Positive values shift items from the beginning of the source to the end. Negative values shift items from the end of the source to the beginning. The default value is 1.
Determines whether substring appears at the start of string.
1 if string starts with substring, otherwise 0.
If a string, finds all matches to substring in the source string, and replaces them with the replacementString.
If a list, finds all matches to listItem in the source list, and replaces them with the replacementItem.
If an expression, finds all matches to the findExpr in the sourceExpr, and replaces them with the replacementExpr. Note that all expressions must be enclosed within an Expr() function.
This is a search and replace function, identical to Substitute() except in place. It searches for a specific portion (second argument) of the source (first argument), and replaces it (third argument). The first argument must be an L-value.
If a string, finds all matches to substring in the source string, and replaces them with the replacementString.
If a list, finds all matches to listItem in the source list, and replaces them with the replacementItem.
If an expression, finds all matches to the findExpr in the sourceExpr, and replaces them with the replacementExpr. Note that all expressions must be enclosed within an Expr() function.
Converts any lower case character found in the quoted string to the equivalent uppercase character.
Extracts the nth word from a character string according to the delimiters given. The default delimiter is space. If you include a third argument, any and all characters in that argument are taken to be delimiters.
Word() is the same as Item(), except that Item() treats each delimiter character as a separate delimiter, and Word() treats several adjacent delimiters as a single delimiter.
Extracts the words from text according to the delimiters given. The default delimiter is space. If you include a second argument, any and all characters in that argument are taken to be delimiters.
The following example stores the XML document in a variable. The XPath Query expression parses the XML to find the text nodes inside the <result> tags. The results are returned in a list.