@servicenow/sdk - v4.4.1
    Preparing search index...
    Index

    Properties

    contains: Contains

    A utility function that checks whether the input value contains a sequence of characters.

    The String

    String - The characters to be searched for.

    Boolean - True if the input String contains the specified substring, false otherwise

    contains('Cheese Pizza', 'Cheese'); // → true
    

    The transfom is case sensitive. If input data type is not String, the data is not transformed at runtime.

    doesNotContain: DoesNotContain

    A utility function that checks whether the input value does not contain a sequence of characters.

    The String

    String - The characters to be searched for.

    Boolean - True if the input String does not contain the specified substring, false otherwise

    doesNotContain('Cheese Pizza', 'Joey'); // → true
    

    The transfom is case sensitive. If input data type is not String, the data is not transformed at runtime.

    endsWith: EndsWith

    A utility function that checks whether the input value ends with a sequence of characters.

    The String

    String - The characters to be searched for.

    Boolean - True if the input String ends with the specified suffix, false otherwise

    endsWith('Cheese Pizza', 'Pizza'); // → true
    

    The transfom is case sensitive. If input data type is not String, the data is not transformed at runtime.

    firstCharacter: FirstCharacter

    Returns the first character of the input string.

    A non-empty string value.

    String - Transformed String as first character of input String

    firstCharacter('Example input string.'); // → 'E'
    

    If input data type is not String, the data is not transformed at runtime.

    lastCharacter: LastCharacter

    Returns the last character of the input String.

    A non-empty string value.

    String - Transformed String as last character of input String

    lastCharacter('Example input string.'); // → '.'
    

    If input data type is not String, the data is not transformed at runtime.

    replaceString: ReplaceString

    Returns a Replaced String from the input String based on the provided Regex and Replacement String.

    The source string.

    Regular expression to be matched for replace

    Replacement String

    String - Transformed String with replaced characters

    replaceString("Example input string.", "\"", "\\\"");
    // → '"Example input string."'

    If input data type is not String, the data is not transformed at runtime.

    size: Size

    Returns the total number of characters in the input String.

    The string whose length to return.

    Number - Total number of characters in the input String

    size('Example input string.'); // → 21
    

    If input data type is not String, the data is not transformed at runtime.

    split: Split

    Returns an Array.String based on a provided Separator that splits the input String.

    The string to split.

    A delimiter that specifies where the input String should be split. If left blank, the input String is not transformed at runtime.

    Array.String - Transformed String split based on the provided separator

    split('Example,input,string.', ',');
    // → ['Example', 'input', 'string.']

    If input data type is not String, the data is not transformed at runtime.

    startsWith: StartsWith

    A utility function that checks whether the input value starts with a sequence of characters.

    The source string.

    The characters to be searched for.

    Boolean - True if the input String starts with the specified prefix, false otherwise

    startsWith('Cheese Pizza', 'Chees'); // → true
    

    If input data type is not String, the data is not transformed at runtime.

    stringToNumber: StringToNumber

    Converts a string to number.

    The string value that should represent a number, e.g. "500".

    Number - The number representation of the input string

    stringToNumber('500'); // → 500
    

    If input data type is not string, the data is not transformed at runtime.

    substring: Substring

    Returns a substring from the input String based on the provided Start Index and End Index.

    The original string.

    Index of the first character to include in the returned substring

    Index of the last character to include in the returned substring

    String - Transformed String based on the provided Start Index and End Index

    substring('Example input string.', 3, 6); // → 'mpl'
    

    Input String index starts at 0. If End Index is not provided, Start Index character and remaineder of input String is returned. If input data type is not String, the data is not transformed at runtime.

    toLowerCase: ToLowerCase

    Converts the input String to all lowercase characters.

    The string to transform.

    String - Transformed String in lowercase

    toLowerCase('ExamPle inpuT stRing.'); // → 'example input string.'
    

    If input data type is not String, the data is not transformed at runtime.

    toProperCase: ToProperCase

    Changes the case of words in the input string. Capitalizes the first letter of each word, and makes every other letter in the word lower case. A word is considered any string separated by a space, hyphen, backslash, or forward slash character. The transform function always evaluates words from left-to-right to determine the first letter.

    The string to transform.

    String - Transformed String with proper case

    toProperCase('exAMPle-input string/TEXT');
    // → 'Example-Input String/Text'

    If input data type is not String, the data is not transformed at runtime.

    toUpperCase: ToUpperCase

    Converts the input string to all uppercase characters.

    The string to transform.

    String - Transformed String in uppercase

    toUpperCase('ExamPle inpuT stRing.'); // → 'EXAMPLE INPUT STRING.'
    

    If input data type is not String, the data is not transformed at runtime.

    trim: Trim

    Removes white space from the beginning and end of the input String.

    The string to trim.

    String - Transformed String with trimmed white space

    trim('   Example input string.   '); // → 'Example input string.'
    

    Does not remove white space within the input String. If input data type is not String, the data is not transformed at runtime.