]> code.delx.au - refind/blob - refind/mystrings.h
Merge remote-tracking branch 'tianon/master'
[refind] / refind / mystrings.h
1 /*
2 * refit/mystrings.h
3 * String functions header file
4 *
5 * Copyright (c) 2012-2015 Roderick W. Smith
6 *
7 * Distributed under the terms of the GNU General Public License (GPL)
8 * version 3 (GPLv3), or (at your option) any later version.
9 *
10 */
11 /*
12 * This program is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 */
25
26 #ifndef __MYSTRINGS_H_
27 #define __MYSTRINGS_H_
28
29 #ifdef __MAKEWITH_GNUEFI
30 #include <efi.h>
31 #include <efilib.h>
32 #else
33 #include "../include/tiano_includes.h"
34 #endif
35 #include "../EfiLib/GenericBdsLib.h"
36
37 BOOLEAN StriSubCmp(IN CHAR16 *TargetStr, IN CHAR16 *BigStr);
38 BOOLEAN MyStriCmp(IN CONST CHAR16 *String1, IN CONST CHAR16 *String2);
39 CHAR16* MyStrStr (IN CHAR16 *String, IN CHAR16 *StrCharSet);
40 VOID ToLower(CHAR16 * MyString);
41 VOID MergeStrings(IN OUT CHAR16 **First, IN CHAR16 *Second, CHAR16 AddChar);
42 VOID MergeWords(CHAR16 **MergeTo, CHAR16 *InString, CHAR16 AddChar);
43 BOOLEAN LimitStringLength(CHAR16 *TheString, UINTN Limit);
44 CHAR16 *FindNumbers(IN CHAR16 *InString);
45 CHAR16 *FindCommaDelimited(IN CHAR16 *InString, IN UINTN Index);
46 BOOLEAN IsIn(IN CHAR16 *SmallString, IN CHAR16 *List);
47 BOOLEAN IsInSubstring(IN CHAR16 *BigString, IN CHAR16 *List);
48
49 BOOLEAN IsValidHex(CHAR16 *Input);
50 UINT64 StrToHex(CHAR16 *Input, UINTN Position, UINTN NumChars);
51 BOOLEAN IsGuid(CHAR16 *UnknownString);
52 CHAR16 * GuidAsString(EFI_GUID *GuidData);
53 EFI_GUID StringAsGuid(CHAR16 * InString);
54
55
56 #endif