MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Find

Method Find

Source/Engine/Platform/Unix/UnixStringUtils.cpp:236–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236const Char* StringUtils::Find(const Char* str, const Char* toFind)
237{
238 while (*str)
239 {
240 const Char* start = str;
241 const Char* sub = toFind;
242
243 // If first character of sub string match, check for whole string
244 while (*str && *sub && *str == *sub)
245 {
246 str++;
247 sub++;
248 }
249
250 // If complete substring match, return starting address
251 if (!*sub)
252 return (Char*)start;
253
254 // Increment main string
255 str = start + 1;
256 }
257
258 // No matches
259 return nullptr;
260}
261
262const char* StringUtils::Find(const char* str, const char* toFind)
263{

Callers 5

OnMemoryFreeMethod · 0.45
InitMethod · 0.45
CreatePxVehicleTireDataFunction · 0.45
CreateVehicleMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected