]>
git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Common/StringFuncs.h
2 String routines implementation
4 Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _EFI_STRING_FUNCS_H
16 #define _EFI_STRING_FUNCS_H
20 #include <Common/UefiBaseTypes.h>
23 // Common data structures
28 // Actually this array can be 0 or more items (based on Count)
35 // Functions declarations
47 Allocates a new string and copies 'String' to clone it
51 String The string to clone
55 CHAR8* - NULL if there are not enough resources
61 StripInfDscStringInPlace (
69 Remove all comments, leading and trailing whitespace from the string.
73 Strin The string to 'strip'
83 SplitStringByWhitespace (
91 Creates and returns a 'split' STRING_LIST by splitting the string
92 on whitespace boundaries.
96 String The string to 'split'
113 Creates a new STRING_LIST with 0 strings.
117 STRING_LIST* - Null if there is not enough resources to create the object.
123 AppendCopyOfStringToList (
124 IN OUT STRING_LIST
**StringList
,
132 Adds String to StringList. A new copy of String is made before it is
143 RemoveLastStringFromList (
144 IN STRING_LIST
*StringList
151 Removes the last string from StringList and frees the memory associated
156 StringList The string list to remove the string from
166 AllocateStringListStruct (
174 Allocates a STRING_LIST structure that can store StringCount strings.
178 StringCount The number of strings that need to be stored
189 IN STRING_LIST
*StringList
196 Frees all memory associated with StringList.
200 StringList The string list to free
211 IN STRING_LIST
*StringList
218 Generates a string that represents the STRING_LIST
222 StringList The string list to convert to a string
226 CHAR8* - The string list represented with a single string. The returned
227 string must be freed by the caller.
234 IN STRING_LIST
*StringList
241 Prints out the string list
245 StringList The string list to print