3 Copyright (c) 1998 Intel Corporation
28 return RtStrCmp(s1, s2);
49 return len ? *s1 - *s2 : 0;
55 IN EFI_UNICODE_COLLATION_INTERFACE *This,
60 return StrCmp (s1, s2);
65 IN EFI_UNICODE_COLLATION_INTERFACE *This,
78 if (UnicodeInterface == &LibStubUnicodeInterface)
79 return UnicodeInterface->StriColl(UnicodeInterface, s1, s2);
81 return uefi_call_wrapper(UnicodeInterface->StriColl, 3, UnicodeInterface, s1, s2);
90 if (UnicodeInterface == &LibStubUnicodeInterface)
91 UnicodeInterface->StrLwr(UnicodeInterface, Str);
92 else uefi_call_wrapper(UnicodeInterface->StrLwr, 2, UnicodeInterface, Str);
101 if (UnicodeInterface == &LibStubUnicodeInterface)
102 UnicodeInterface->StrUpr(UnicodeInterface, Str);
103 else uefi_call_wrapper(UnicodeInterface->StrUpr, 2, UnicodeInterface, Str);
113 RtStrCpy (Dest, Src);
140 return RtStrSize(s1);
147 // duplicate a string
153 Dest = AllocatePool (Size);
155 CopyMem (Dest, Src, Size);
168 for (len=0; *s1; s1+=1, len+=1) ;
209 return len ? *s1 - *s2 : 0;
218 // convert hex string to uint
223 // skip preceeding white space
224 while (*str && *str == ' ') {
228 // convert hex digits
230 while ((c = *(str++))) {
231 if (c >= 'a' && c <= 'f') {
235 if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F')) {
236 u = (u << 4) | (c - (c >= 'A' ? 'A'-10 : '0'));
249 // convert hex string to uint
254 // skip preceeding white space
255 while (*str && *str == ' ') {
261 while ((c = *(str++))) {
262 if (c >= '0' && c <= '9') {
263 u = (u * 10) + c - '0';
286 // End of pattern. If end of string, TRUE match
287 return *String ? FALSE : TRUE;
290 // Match zero or more chars
292 if (MetaMatch (String, Pattern)) {
297 return MetaMatch (String, Pattern);
300 // Match any one char
311 return FALSE; // syntax problem
315 while ((p = *Pattern++)) {
320 if (p == '-') { // if range of chars,
321 p = *Pattern; // get high range
322 if (p == 0 || p == ']') {
323 return FALSE; // syntax problem
326 if (c >= l && c <= p) { // if in range,
327 break; // it's a match
332 if (c == p) { // if char matches
337 // skip to end of match char set
338 while (p && p != ']') {
361 IN EFI_UNICODE_COLLATION_INTERFACE *This,
366 return MetaMatch (String, Pattern);
376 if (UnicodeInterface == &LibStubUnicodeInterface)
377 return UnicodeInterface->MetaiMatch(UnicodeInterface, String, Pattern);
378 else return uefi_call_wrapper(UnicodeInterface->MetaiMatch, 3, UnicodeInterface, String, Pattern);