]>
git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Common/StringFuncs.h
2 String routines implementation
4 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef _EFI_STRING_FUNCS_H
10 #define _EFI_STRING_FUNCS_H
14 #include <Common/UefiBaseTypes.h>
17 // Common data structures
22 // Actually this array can be 0 or more items (based on Count)
29 // Functions declarations
41 Allocates a new string and copies 'String' to clone it
45 String The string to clone
49 CHAR8* - NULL if there are not enough resources
55 StripInfDscStringInPlace (
63 Remove all comments, leading and trailing whitespace from the string.
67 String The string to 'strip'
77 SplitStringByWhitespace (
85 Creates and returns a 'split' STRING_LIST by splitting the string
86 on whitespace boundaries.
90 String The string to 'split'
107 Creates a new STRING_LIST with 0 strings.
111 STRING_LIST* - Null if there is not enough resources to create the object.
117 AppendCopyOfStringToList (
118 IN OUT STRING_LIST
**StringList
,
126 Adds String to StringList. A new copy of String is made before it is
137 RemoveLastStringFromList (
138 IN STRING_LIST
*StringList
145 Removes the last string from StringList and frees the memory associated
150 StringList The string list to remove the string from
160 AllocateStringListStruct (
168 Allocates a STRING_LIST structure that can store StringCount strings.
172 StringCount The number of strings that need to be stored
183 IN STRING_LIST
*StringList
190 Frees all memory associated with StringList.
194 StringList The string list to free
205 IN STRING_LIST
*StringList
212 Generates a string that represents the STRING_LIST
216 StringList The string list to convert to a string
220 CHAR8* - The string list represented with a single string. The returned
221 string must be freed by the caller.
228 IN STRING_LIST
*StringList
235 Prints out the string list
239 StringList The string list to print