ucc::string::string::cstring Class Reference
This is an internal class which contains the actual
string data along with some control fields.
More...
#include <string.h>
Detailed Description
This is an internal class which contains the actual
string data along with some control fields.
The string can be either NULL terminated or filled like a Pascal-style string, but with a user selected fill character. The cstring object is an overdraft object, as the actual string text which is of unknown size follows immediately after the class control data. This class is primarely for internal use.
- Author:
- David Sugar <dyfet@gnutelephony.org>
Definition at line 89 of file string.h.
Constructor & Destructor Documentation
ucc::string::string::cstring::cstring |
( |
strsize_t |
size |
) |
|
Create a cstring node allocated for specified string size.
The new operator would also need the size as an overdraft value.
- Parameters:
-
ucc::string::string::cstring::cstring |
( |
strsize_t |
size, |
|
|
char |
fill | |
|
) |
| | |
Create a filled cstring node allocated for specified string size.
The new operator would also need the size as an overdraft value. The newly allocated string is filled with the fill value.
- Parameters:
-
Member Function Documentation
void ucc::string::string::cstring::add |
( |
char |
character |
) |
|
Append a single character to our string buffer.
- Parameters:
-
void ucc::string::string::cstring::add |
( |
StringFormat & |
format |
) |
|
Append text to string buffer from formatting object.
- Parameters:
-
| format | object to add from. |
void ucc::string::string::cstring::add |
( |
char * |
text |
) |
|
Append null terminated text to our string buffer.
- Parameters:
-
Used to clear a string.
If null terminated, then the string ends at the offset, otherwise it is simply filled with fill data up to the specified size.
- Parameters:
-
| offset | to clear from. |
| size | of field to clear. |
void ucc::string::string::cstring::dec |
( |
strsize_t |
number |
) |
|
Adjust size of our string buffer by deleting characters from end of buffer.
- Parameters:
-
| number | of characters to delete. |
void ucc::string::string::cstring::inc |
( |
strsize_t |
number |
) |
|
Adjust size of our string buffer by deleting characters from start of buffer.
- Parameters:
-
| number | of characters to delete. |
void ucc::string::string::cstring::set |
( |
char * |
text |
) |
|
Set our string from null terminated text up to our allocated size.
- Parameters:
-
void ucc::string::string::cstring::set |
( |
StringFormat & |
format |
) |
|
Set our string from a string formatting object.
- Parameters:
-
| format | object to set from. |
Set part or all of a string with new text.
- Parameters:
-
| offset | to set from. |
| text | to insert from null terminated string. |
| size | of field to modify. This is filled for fill mode. |
The documentation for this class was generated from the following file: