exip  Alpha 0.5.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
include/stringManipulate.h
Go to the documentation of this file.
1 /*==================================================================*\
2 | EXIP - Embeddable EXI Processor in C |
3 |--------------------------------------------------------------------|
4 | This work is licensed under BSD 3-Clause License |
5 | The full license terms and conditions are located in LICENSE.txt |
6 \===================================================================*/
7 
17 #ifndef STRINGMANIPULATE_H_
18 #define STRINGMANIPULATE_H_
19 
20 #include "procTypes.h"
21 #include "errorHandle.h"
22 
32 
43 
59 errorCode writeCharToString(String* str, uint32_t code_point, Index* writerPosition);
60 
69 uint32_t readCharFromString(const String* str, Index* readerPosition);
70 
75 void getEmptyString(String* emptyStr);
76 
82 boolean isStringEmpty(const String* str);
83 
94 errorCode asciiToString(const char* inStr, String* outStr, AllocList* memList, boolean clone);
95 
102 boolean stringEqual(const String str1, const String str2);
103 
110 int stringCompare(const String str1, const String str2);
111 
118 boolean stringEqualToAscii(const String str1, const char* str2);
119 
126 errorCode cloneString(const String* src, String* newStr);
127 
135 errorCode cloneStringManaged(const String* src, String* newStr, AllocList* memList);
136 
143 Index getIndexOfChar(const String* src, CharType sCh);
144 
151 errorCode stringToInteger(const String* src, int* number);
152 
159 errorCode stringToInt64(const String* src, int64_t* number);
160 
161 #if EXIP_IMPLICIT_DATA_TYPE_CONVERSION
162 
172 errorCode integerToString(Integer number, String* outStr);
173 
183 errorCode booleanToString(boolean b, String* outStr);
184 
194 errorCode floatToString(Float f, String* outStr);
195 
206 
217 
218 #endif /* EXIP_IMPLICIT_DATA_TYPE_CONVERSION */
219 
220 
221 #if EXIP_DEBUG == ON
222 
228 void printString(const String* inStr);
229 
230 #endif /* EXIP_DEBUG */
231 
232 #endif /* STRINGMANIPULATE_H_ */