MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / StriStr

Function StriStr

rEFIt_UEFI/entry_scan/common.cpp:233–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233CONST CHAR16 *StriStr(IN CONST CHAR16 *Str,
234 IN CONST CHAR16 *SearchFor)
235{
236 CONST CHAR16 *End;
237 UINTN Length;
238 UINTN SearchLength;
239 if ((Str == NULL) || (SearchFor == NULL)) {
240 return NULL;
241 }
242 Length = StrLen(Str);
243 if (Length == 0) {
244 return NULL;
245 }
246 SearchLength = StrLen(SearchFor);
247 if (SearchLength > Length) {
248 return NULL;
249 }
250 End = Str + (Length - SearchLength) + 1;
251 while (Str < End) {
252 if (StrniCmp(Str, SearchFor, SearchLength) == 0) {
253 return Str;
254 }
255 ++Str;
256 }
257 return NULL;
258}
259
260VOID StrToLower(IN CHAR16 *Str)
261{

Callers 7

ScanDriverDirFunction · 0.85
DisconnectSomeDevicesFunction · 0.85
ResetNativeNvramFunction · 0.85
GetListOfACPIFunction · 0.85
ScanLoaderFunction · 0.85
PrecheckSecureBootPolicyFunction · 0.85

Calls 2

StrniCmpFunction · 0.70
StrLenFunction · 0.50

Tested by

no test coverage detected