Go to the source code of this file.
Defines | |
#define | ctl_fstring(tchar) ctl_mstring(tchar,fixed) |
This is the mutable string that stays the same size When you hit the limit imposed at instantiation, that's all you ever get. | |
#define | ctl_fstring_(tchar) ctl_mstring_(tchar,fixed) |
#define | ctl_fstring_destroy(tchar, self) |
Function to de-initialize fixed buffer (NOP). | |
#define | ctl_fstring_auto(tchar, size, label) |
Make string on stack or as a global, with buffer Uses non-standard ANSI extensions: non-const initializers. | |
#define | ctl_fstring_auto_buff(tchar, buff, size, label) ctl_mstring(tchar,fixed) label = {(buff),(buff),(buff)+(size)-1} |
Initialize from a NUL terminated string pointer Uses non-standard ANSI extensions: non-const initializers. | |
#define | ctl_fstring_init(tchar, self, buff, len) |
Initialize from a NUL terminated string pointer. | |
#define | ctl_fstring_init_sz(tchar, self, sz) |
Initialize from a NUL terminated string pointer. | |
#define | ctl_fstring_swap(tchar, p1, p2) |
Swap two fstrings -. | |
#define | ctl_fstring_move(tchar, p1, p2) |
Move contents of one string to another. | |
#define | ctl_fstring_remain(tchar, self) ( (self)->endBuff - (self)->end ) |
Tell how much bigger the string can get. | |
#define | ctl_fstring_size(tchar, self) ((size_t)( (self)->end - (self)->begin )) |
Tell how many characters are in the string, right now. | |
#define | ctl_fstring_maxsize(tchar, self) ((size_t)( (self)->endBuff - (self)->begin )) |
Tell how many total characters can be put in the string. | |
#define | ctl_fstring_reset(tchar, self) ( *((self)->end = (self)->begin) = 0 ) |
Reset parse point to beginning. | |
#define | ctl_fstring_begin(tchar, self) ( (self)->begin ) |
Point at start of string. | |
#define | ctl_fstring_end(tchar, self) ( (self)->end ) |
Point to the end of the string. | |
#define | ctl_fstring_fill(tchar, self, fillVal, count) ctl_mstring_(tchar,fixed, fill )((self), (fillVal), (count) ) |
Fill string at parse point with a given number of characters. | |
#define | ctl_fstring_add(tchar, self, ch) ctl_mstring_(tchar,fixed, fill )((self), (ch), 1 ) |
Fill string at parse point with a given number of characters. | |
#define | ctl_fstring_filltab(tchar, self, fillVal, tabPos) ctl_mstring_(tchar,fixed, filltab )((self), (fillVal), (tabPos) ) |
Fill to some tab position with a given number of characters. | |
#define | ctl_fstring_putbool(tchar, self, value) ctl_mstring_(tchar,fixed, strncat )((self),(value) ? szconst(tchar,"true") : szconst(tchar,"false"), ~0u ) |
Write a boolean as "true" or "false". | |
#define | ctl_fstring_putboolyesno(tchar, self, value) ctl_mstring_(tchar,fixed, strncat )((self),(value) ? szconst(tchar,"yes") : szconst(tchar,"no"), ~0u ) |
Write a boolean as "yes" or "no". | |
#define | ctl_fstring_putboolonoff(tchar, self, value) ctl_mstring_(tchar,fixed, strncat )((self),(value) ? szconst(tchar,"on") : szconst(tchar,"off"), ~0u ) |
Write a boolean as "on" or "off". | |
#define | ctl_fstring_putbool10(tchar, self, value) ctl_mstring_(tchar,fixed, strncat )((self),(value) ? szconst(tchar,"1") : szconst(tchar,"0"), ~0u ) |
Write a boolean as "1" or "0". | |
#define | ctl_fstring_putint8(tchar, self, value) ctl_mstring_(tchar,fixed, putint32 )((self),(int32)(int8)(value) ) |
Write a value as a decimal number. | |
#define | ctl_fstring_putuint8(tchar, self, value) ctl_mstring_(tchar,fixed, putuint32 )((self),(uint32)(uint8)(value) ) |
Write a value as a decimal number. | |
#define | ctl_fstring_putint16(tchar, self, value) ctl_mstring_(tchar,fixed, putint32 )((self),(int32)(int16)(value) ) |
Write a value as a decimal number. | |
#define | ctl_fstring_putuint16(tchar, self, value) ctl_mstring_(tchar,fixed, putuint32 )((self),(uint32)(uint16)(value) ) |
Write a value as a decimal number. | |
#define | ctl_fstring_putint32(tchar, self, value) ctl_mstring_(tchar,fixed, putint32 )((self),(value) ) |
Write a value as a decimal number. | |
#define | ctl_fstring_putuint32(tchar, self, value) ctl_mstring_(tchar,fixed, putuint32 )((self),(value) ) |
Write a value as a decimal number. | |
#define | ctl_fstring_putint64(tchar, self, value) ctl_mstring_(tchar,fixed, putint64 )((self),(value) ) |
Write a value as a decimal number. | |
#define | ctl_fstring_putuint64(tchar, self, value) ctl_mstring_(tchar,fixed, putuint64 )((self),(value) ) |
Write a value as a decimal number. | |
#define | ctl_fstring_putfloat32(tchar, self, value) ctl_mstring_(tchar,fixed, putfloat64 )((self),(value) ) |
Write a floating point value as a decimal number. | |
#define | ctl_fstring_putfloat64(tchar, self, value) ctl_mstring_(tchar,fixed, putfloat64 )((self),(value) ) |
Write a floating point value as a decimal number. | |
#define | ctl_fstring_putxint8(tchar, self, value) ctl_mstring_(tchar,fixed, putxuint32 )((self),(uint32)(value), 2 ) |
Write a value as a hexadecimal number. | |
#define | ctl_fstring_putxint16(tchar, self, value) ctl_mstring_(tchar,fixed, putxuint32 )((self),(uint32)(value), 4 ) |
Write a value as a hexadecimal number. | |
#define | ctl_fstring_putxint32(tchar, self, value) ctl_mstring_(tchar,fixed, putxuint32 )((self),(uint32)(value), 8 ) |
Write a value as a hexadecimal number. | |
#define | ctl_fstring_putxint64(tchar, self, value) ctl_mstring_(tchar,fixed, putxuint64 )((self),(uint32)(value), 16 ) |
Write a value as a hexadecimal number. | |
#define | ctl_fstring_putxuint8(tchar, self, value) ctl_mstring_(tchar,fixed, putxuint32 )((self),(uint32)(value), 2 ) |
Write a value as a hexadecimal number. | |
#define | ctl_fstring_putxuint16(tchar, self, value) ctl_mstring_(tchar,fixed, putxuint32 )((self),(value), 4 ) |
Write a value as a hexadecimal number. | |
#define | ctl_fstring_putxuint32(tchar, self, value) ctl_mstring_(tchar,fixed, putxuint32 )((self),(value), 8 ) |
Write a value as a hexadecimal number. | |
#define | ctl_fstring_putxuint64(tchar, self, value) ctl_mstring_(tchar,fixed, putxuint64 )((self),(value), 16 ) |
Write a value as a hexadecimal number. | |
#define | ctl_fstring_putenum(tchar, self, value, szzList, szUndefined) ctl_mstring_(tchar,fixed, putenum )((self),(value),(szzList), countof(szzList),(szUndefined) ) |
Write an enumerated value. | |
#define | ctl_fstring_putenum_max(tchar, self, value, szzList, max, szUndefined) ctl_mstring_(tchar,grow, putenum )((self),(value),(szzList), (max), (szUndefined) ) |
Write an enumerated value. | |
#define | ctl_fstring_strcat(tchar, self, sz) ctl_mstring_(tchar,fixed, strncat )((self),(sz), ~0u ) |
Concatenate a string onto this at parse. | |
#define | ctl_fstring_strcpy(tchar, self, sz) ctl_mstring_(tchar,fixed, strncpy )((self),(sz), ~0u ) |
Copy another string on top of this, setting the parse point after sz. | |
#define | ctl_fstring_strncat(tchar, self, sz, maxLen) ctl_mstring_(tchar,fixed, strncat )((self),(sz),(maxLen) ) |
Concatenate a string onto this at parse. | |
#define | ctl_fstring_strncpy(tchar, self, sz, maxLen) ctl_mstring_(tchar,fixed, strncpy )((self),(sz),(maxLen) ) |
Copy another string on top of this, setting the parse point and end after sz. | |
#define | ctl_fstring_strinsert(tchar, self, position, sz) ctl_mstring_(tchar,fixed, strninsert )((self),(position),(sz), 0u ) |
Insert a string at parse; anything between 'position' and 'parse' is maintained AFTER inserted string. | |
#define | ctl_fstring_strninsert(tchar, self, position, sz, maxLen) ctl_mstring_(tchar,fixed, strninsert )((self),(position),(sz),(maxLen) ) |
Insert a string at parse; anything between 'position' and 'parse' is maintained AFTER inserted string. | |
#define | ctl_fstring_vsprintf(tchar, self, fmt, args) ctl_mstring_(tchar,fixed, vsprintf )((self),(fmt),(args) ) |
Add/overwrite text at parse ala vsprintf formatting arguments. | |
#define | ctl_fstring_sprintf(tchar, selffmtargs) ctl_mstring_(tchar,fixed, sprintf ) selffmtargs |
Add/overwrite text at parse ala sprintf formatting arguments. | |
#define | ctl_fstring_makeClabel(tchar, self) ctl_mstring_(tchar,fixed, makeClabel )( (self) ) |
Convert contents into something label-friendly for C. | |
#define | ctl_fstring_truncate(tchar, self, newsize) ctl_mstring_(tchar,fixed, truncate )( (self), (newsize) ) |
Truncate a string's trailing characters. | |
#define | ctl_fstring_foreach(tchar, self, iterator) |
Iterate the characters in the string from beginning to end. | |
#define | ctl_fstring_foreach_reverse(tchar, self, iterator) |
Iterate the characters in the string from end to beginning. |
Definition in file fstring.h.
#define ctl_fstring_ | ( | tchar | ) | ctl_mstring_(tchar,fixed) |