Skip to main content

find_first_not_of

Method of string.

Overloads

NameDescription
find_first_not_of(string list) -> ObjectFinds the first character not contained in a character list.
find_first_not_of(const string f, integer pos) -> integerFinds the first occurrence of any character not in the specified substring starting from the given position.

find_first_not_of(string list) -> Object

Finds the first character not contained in a character list.

Parameters

  • list: The characters to exclude.

Returns

The match position, or the underlying not-found value.

Example

"abcd".find_first_not_of("abd")
//-> 2

find_first_not_of(const string f, integer pos) -> integer

Finds the first occurrence of any character not in the specified substring starting from the given position.

Parameters

  • f: The substring containing characters to exclude.
  • pos: The position to start the search from.