summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ucs2.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/ucs2.h b/ucs2.h
index 03742847..d2ad6490 100644
--- a/ucs2.h
+++ b/ucs2.h
@@ -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 */