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

Function StringFindFirst

sdk/add_on/scriptstdstring/scriptstdstring.cpp:373–377  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

371// AngelScript signature:
372// int string::findFirst(const string &in sub, uint start = 0) const
373static int StringFindFirst(const string &sub, asUINT start, const string &str)
374{
375 // We don't register the method directly because the argument types change between 32bit and 64bit platforms
376 return (int)str.find(sub, (size_t)(start < 0 ? string::npos : start));
377}
378
379// This function returns the index of the first position that matches the regular expression
380//

Callers 1

StringFindFirst_GenericFunction · 0.85

Calls 1

findMethod · 0.80

Tested by

no test coverage detected