|
Deadline Scripting Reference
10.2.1.1
|
String utility functions. More...
Static Public Member Functions | |
| static string | BlankIfEitherIsBlank (string str1, string str2) |
| If both strings are non-empty, they are combined and returned as the result. If either string is empty, an empty string is returned. More... | |
| static bool | ContainsOnlyWordCharacters (string str) |
| Returns true if the given string is non-empty, and only contains letters, numbers, underscores, and hyphens. More... | |
| static string[] | FromCommaSeparatedString (string list) |
| Converts a comma separated string into a list of strings. More... | |
| static string[] | FromCommaSeparatedString (string list, bool allowEmptyTokens) |
| Converts a comma separated string into a list of strings. More... | |
| static string[] | FromSemicolonSeparatedString (string list) |
| Converts a semicolon separated string into a list of strings. More... | |
| static string[] | FromSemicolonSeparatedString (string list, bool allowEmptyTokens) |
| Converts a semicolon separated string into a list of strings. More... | |
| static string | GetDecryptedVncPasswordString (string str) |
| Decrypts the password from the given encrypted VNC string. More... | |
| static string | GetEncryptedVncPasswordString (string password) |
| Gets an encrypted VNC password string from the given password. More... | |
| static string | GetNumeralKeyFromPath (string pathWithNumeralKey, char[] numeralKeyChars) |
| Retrieves the numeral key (based on the specified numeral key characters) from the specified path. More... | |
| static string | GetNumeralKeyFromPath (string pathWithNumeralKey, char[] numeralKeyChars, bool allowEmptyNumeralKey) |
| Retrieves the numeral key (based on the specified numeral key characters) from the specified path. More... | |
| static bool | IsEmpty (string str) |
| Checks if the specified string is empty. More... | |
| static string | Pad (string str, int desiredLength, char fillCharacter) |
| Pads the specified string with the fill character to achieve the desired length. More... | |
| static bool | ParseBoolean (string s) |
| Parses a boolean value from the string. Throws an error if a boolean value could not be parsed. More... | |
| static bool | ParseBooleanWithDefault (string s, bool defaultValue) |
| Parses a boolean value from the string. Returns the default value if a boolean value could not be parsed. More... | |
| static float | ParseLeadingNumber (string s) |
| Parses the number at the begining of the specified string. More... | |
| static string | RemoveWhitespace (string str) |
| Removes all whitespace from the specified string, including tabs and end of line characters. More... | |
| static string | ReplaceNumeralKey (string pathWithNumeralKey, string numeralKey, int index, bool padExtra) |
| Replaces the specified numeralKey in the specified path with the specified index. More... | |
| static string | ToCommaSeparatedString (string[] strings, bool includeSpaces) |
| Converts a list of strings to a comma separated string. More... | |
| static string | ToSemicolonSeparatedString (string[] strings, bool includeSpaces) |
| Converts a list of strings to a semicolon separated string. More... | |
| static string | ToZeroPaddedString (int value, int length) |
| Creates a string of the desired length containing the given value, padded with zeros. More... | |
| static string | ToZeroPaddedString (int value, int length, bool strictLength) |
| Creates a string of the desired length containing the given value, padded with zeros. More... | |
String utility functions.
|
static |
If both strings are non-empty, they are combined and returned as the result. If either string is empty, an empty string is returned.
| str1 | The first string. |
| str2 | The second string. |
|
static |
Returns true if the given string is non-empty, and only contains letters, numbers, underscores, and hyphens.
| str | The string. |
|
static |
Converts a comma separated string into a list of strings.
| list | The list as a string. |
|
static |
Converts a comma separated string into a list of strings.
| list | The list as a string. |
| allowEmptyTokens | Whether to allow empty tokens in the result. |
|
static |
Converts a semicolon separated string into a list of strings.
| list | The list as a string. |
|
static |
Converts a semicolon separated string into a list of strings.
| list | The list as a string. |
| allowEmptyTokens | Whether to allow empty tokens in the result. |
|
static |
Decrypts the password from the given encrypted VNC string.
| str | The encrypted VNC string. |
|
static |
Gets an encrypted VNC password string from the given password.
| password | The password. |
|
static |
Retrieves the numeral key (based on the specified numeral key characters) from the specified path.
| pathWithNumeralKey | The path with a numeral key. |
| numeralKeyChars | The character(s) which represent a numerical key. For example: '#' or '?'. |
|
static |
Retrieves the numeral key (based on the specified numeral key characters) from the specified path.
| pathWithNumeralKey | The path with a numeral key. |
| numeralKeyChars | The character(s) which represent a numerical key. For example: '#' or '?'. |
| allowEmptyNumeralKey | If False, an error will be thrown if the specified path doesn't contain a numerical key. |
|
static |
Checks if the specified string is empty.
| str | The string. |
|
static |
Pads the specified string with the fill character to achieve the desired length.
| str | The string. |
| desiredLength | The desired length. |
| fillCharacter | The fill character. |
|
static |
Parses a boolean value from the string. Throws an error if a boolean value could not be parsed.
| s | The string. |
|
static |
Parses a boolean value from the string. Returns the default value if a boolean value could not be parsed.
| s | The string. |
| defaultValue | The default value. |
|
static |
Parses the number at the begining of the specified string.
| s | The string. |
|
static |
Removes all whitespace from the specified string, including tabs and end of line characters.
| str | The string. |
|
static |
Replaces the specified numeralKey in the specified path with the specified index.
| pathWithNumeralKey | The path with the numeral key. |
| numeralKey | The numeral key to replace. |
| index | The number to replace the numeral key with. |
| padExtra | If True, extra padding will be added if necessary to ensure the entire number is inserted into the numeral key. |
|
static |
Converts a list of strings to a comma separated string.
| strings | The string list. |
| includeSpaces | If spaces should be inserted after each comma. |
|
static |
Converts a list of strings to a semicolon separated string.
| strings | The string list. |
| includeSpaces | If spaces should be inserted after each semicolon. |
|
static |
Creates a string of the desired length containing the given value, padded with zeros.
| value | The number to pad with zeros. |
| length | The length the resulting string should be. |
|
static |
Creates a string of the desired length containing the given value, padded with zeros.
| value | The number to pad with zeros. |
| length | The length the resulting string should be. |
| strictLength | If False, an error will be thrown if the result is longer than the given length. |