Onetastic Macro Documentation >
>
>
String_FindFirstNotOf String_FindFirstNotOf
Finds the first character that does not match any of given the characters in an input string. Returns true if it was found and the offset it was found at, false otherwise.
Syntax
Bool String_FindFirstNotOf(
String string,
String characters,
Numeric offset,
out Numeric foundAt)
Parameters
- String string
- String to search in.
- String characters
- The set of characters to look for.
- Numeric offset
- Offset of the input string to start search from. If non-negative, search will start this number of characters counted from the beginning of the string. If negative, the search will start this number of characters counted from the end of the string.
- out Numeric foundAt
- If a character that does not match any of the given characters is found, the offset of the first occurence is stored in this variable.
Examples
$string = "a4 b6 c5 4a b6 d5 f6 d7 e4 b6 c2 56 d4 5a"
String_FindFirstNotOf($string, "abde2456", 0, $foundAt)
String_FindFirstNotOf($string, "abde2456", 9, $foundAt)
String_FindFirstNotOf($string, "abde2456", -20, $foundAt)
String_FindFirstNotOf($string, "abcdef24567", 0, $foundAt)
|