mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-06-06 20:25:19 +00:00
Add StrCSpn()
Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
parent
9754732ca1
commit
1f41bdc79d
16
ucs2.h
16
ucs2.h
@ -73,4 +73,20 @@ StrnCaseCmp(CHAR16 *s0, CHAR16 *s1, int n)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline UINTN
|
||||||
|
__attribute__((unused))
|
||||||
|
StrCSpn(const CHAR16 *s, const CHAR16 *reject)
|
||||||
|
{
|
||||||
|
UINTN ret;
|
||||||
|
|
||||||
|
for (ret = 0; s[ret] != L'\0'; ret++) {
|
||||||
|
int i;
|
||||||
|
for (i = 0; reject[i] != L'\0'; i++) {
|
||||||
|
if (reject[i] == s[ret])
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* SHIM_UCS2_H */
|
#endif /* SHIM_UCS2_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user