Easypt

find

..Root.String.find

Searches the string for the first occurrence of str, the search only includes characters at or after position pos. If no matches were found, the function returns -1.

Child of:

String

Signatures:

NativeCallable, Callable

Example:

log("Hello World".find("lo", 0));

auto str.=("Hello World!");
auto begin.=(str.begin().+(str.find(" ", 0)));
auto end.=(str.begin().+(str.find("!", 0)));
str.erase(begin, end);
log(str);

Expected output:

3
Hello!