MCPcopy Create free account
hub / github.com/anjo76/angelscript / StringFindFirstOf

Function StringFindFirstOf

sdk/add_on/scriptstdstring/scriptstdstring.cpp:430–434  ·  view source on GitHub ↗

This function returns the index of the first position where the one of the bytes in substring exists in the input string. If the characters in the substring doesn't exist in the input string -1 is returned. AngelScript signature: int string::findFirstOf(const string &in sub, uint start = 0) const

Source from the content-addressed store, hash-verified

428// AngelScript signature:
429// int string::findFirstOf(const string &in sub, uint start = 0) const
430static int StringFindFirstOf(const string &sub, asUINT start, const string &str)
431{
432 // We don't register the method directly because the argument types change between 32bit and 64bit platforms
433 return (int)str.find_first_of(sub, (size_t)(start < 0 ? string::npos : start));
434}
435
436// This function returns the index of the last position where the one of the bytes in substring
437// exists in the input string. If the characters in the substring doesn't exist in the input

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected