MCPcopy Create free account
hub / github.com/Rezonality/zep / string_first_of

Function string_first_of

src/mcommon/string/stringutils.cpp:286–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286size_t string_first_of(const char* text, size_t start, size_t end, const char* delims)
287{
288 for (auto index = start; index < end; index++)
289 {
290 auto pDelim = delims;
291 while (*pDelim != 0)
292 {
293 if (text[index] == *pDelim++)
294 {
295 return index;
296 }
297 }
298 }
299 return std::string::npos;
300}
301
302void string_split_each(char* text, size_t startIndex, size_t endIndex, const char* delims, std::function<bool(size_t, size_t)> fn)
303{

Callers 1

string_split_eachFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected