exip
Alpha 0.5.4
|
String manipulation functions used for UCS <-> ASCII transformations. More...
Go to the source code of this file.
Macros | |
#define | PARSING_STRING_MAX_LENGTH 100 |
Functions | |
errorCode | allocateStringMemory (CharType **str, Index UCSchars) |
Allocate a memory for a string with UCSchars number of UCS characters It depends on the representation of the characters. More... | |
errorCode | allocateStringMemoryManaged (CharType **str, Index UCSchars, AllocList *memList) |
Allocate a memory for a string with UCSchars number of UCS characters It depends on the representation of the characters. More... | |
errorCode | writeCharToString (String *str, uint32_t code_point, Index *writerPosition) |
Simple translation working only for ASCII characters. More... | |
void | getEmptyString (String *emptyStr) |
Creates an empty string. More... | |
boolean | isStringEmpty (const String *str) |
Checks if an string is empty. More... | |
errorCode | asciiToString (const char *inStr, String *outStr, AllocList *memList, boolean clone) |
Transform a NULL terminated string of ASCII chars to String allocating memory for the CharType*. More... | |
boolean | stringEqual (const String str1, const String str2) |
Tests if two strings are equal. More... | |
boolean | stringEqualToAscii (const String str1, const char *str2) |
Checks if a String string and ASCII string are equal. More... | |
int | stringCompare (const String str1, const String str2) |
Compare two strings lexicographically. More... | |
uint32_t | readCharFromString (const String *str, Index *readerPosition) |
Returns the UCS [ISO/IEC 10646] code point at particular index from a String. More... | |
errorCode | cloneString (const String *src, String *newStr) |
Makes a copy of the string in a new location. More... | |
errorCode | cloneStringManaged (const String *src, String *newStr, AllocList *memList) |
Makes a copy of the string in a new location. More... | |
Index | getIndexOfChar (const String *src, CharType sCh) |
Returns the index of the first occurrence of a character in a string. More... | |
errorCode | stringToInteger (const String *src, int *number) |
Converts a string to int representation. More... | |
errorCode | stringToInt64 (const String *src, int64_t *number) |
Converts a string to int64 representation. More... | |
void | printString (const String *inStr) |
Prints out a String Used for debugging purposes. More... | |
Definition in file ASCII_stringManipulate.c.
#define PARSING_STRING_MAX_LENGTH 100 |
Definition at line 21 of file ASCII_stringManipulate.c.
[in,out] | str | a pointer to the uninitialized string |
[in] | UCSchars | the number of characters (as described by UCS [ISO/IEC 10646]) |
Definition at line 23 of file ASCII_stringManipulate.c.
[in,out] | str | a pointer to the uninitialized string |
[in] | UCSchars | the number of characters (as described by UCS [ISO/IEC 10646]) |
[in,out] | memList | A list storing the memory allocations |
Definition at line 31 of file ASCII_stringManipulate.c.
[in] | inStr | ASCII stream |
[in,out] | outStr | resulted string |
[in,out] | memList | A list storing the memory allocations |
[in] | clone | Boolean indicating if outStr should reuse the memory allocated for inStr if possible. FALSE - if String implementation allows it - do not allocate new memory for the string TRUE - always allocate fresh memory for outStr and copy inStr there |
Definition at line 64 of file ASCII_stringManipulate.c.
[in] | src | the string to be copied |
[in] | newStr | will point to the newly allocated memory with scr->CharType* copied there |
Definition at line 155 of file ASCII_stringManipulate.c.
[in] | src | the string to be copied |
[in] | newStr | will point to the newly allocated memory with scr->CharType* copied there |
[in,out] | memList | A list storing the memory allocations |
Definition at line 167 of file ASCII_stringManipulate.c.
void getEmptyString | ( | String * | emptyStr) |
[in,out] | emptyStr | empty string |
Definition at line 51 of file ASCII_stringManipulate.c.
[in] | src | the source string |
[in] | sCh | a character that is searched |
Definition at line 179 of file ASCII_stringManipulate.c.
[in] | str | string to check |
Definition at line 57 of file ASCII_stringManipulate.c.
void printString | ( | const String * | inStr) |
[in] | inStr | Input string to be printed |
Definition at line 272 of file ASCII_stringManipulate.c.
[in] | str | string |
[in,out] | readerPosition,: | [in] The position that marks the beginning of the character to be read [out] The position of the next character to be passed to a subsequent calls to readCharFromString |
Definition at line 148 of file ASCII_stringManipulate.c.
[in] | str1 | string to compare |
[in] | str2 | string to compare |
Definition at line 122 of file ASCII_stringManipulate.c.
[in] | str1 | string to compare |
[in] | str2 | string to compare |
Definition at line 88 of file ASCII_stringManipulate.c.
[in] | str1 | string to compare |
[in] | str2 | null terminated string to compare |
Definition at line 106 of file ASCII_stringManipulate.c.
Only 10-base representation
[in] | src | the source string |
[out] | number | the int64 representation of the string |
Definition at line 216 of file ASCII_stringManipulate.c.
Only 10-base representation
[in] | src | the source string |
[out] | number | the int representation of the string |
Definition at line 191 of file ASCII_stringManipulate.c.