diff options
| author | Peter Jones <pjones@redhat.com> | 2013-04-30 09:46:22 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2013-04-30 09:46:22 -0400 |
| commit | 8f6eace1897d210ec98fdc358f51345021b5a892 (patch) | |
| tree | 84369b07f2949433271d029b5670115fa8480832 | |
| parent | 0283024e0e861e2f933a5a6e22b0a7d0f869df5e (diff) | |
| download | efi-boot-shim-8f6eace1897d210ec98fdc358f51345021b5a892.tar.gz efi-boot-shim-8f6eace1897d210ec98fdc358f51345021b5a892.zip | |
Add StrCSpn()
Signed-off-by: Peter Jones <pjones@redhat.com>
| -rw-r--r-- | ucs2.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -73,4 +73,20 @@ StrnCaseCmp(CHAR16 *s0, CHAR16 *s1, int n) 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 */ |
