Functions |
const char * | ChrPtr (const StrBuf *Str) |
| Cast operator to Plain String.
|
int | StrLength (const StrBuf *Str) |
| since we know strlen()'s result, provide it here.
|
Detailed Description
use these operators to interfere with code demanding char*; if you need to own the content, smash me. Avoid, since we loose the length information.
Function Documentation
const char* ChrPtr |
( |
const StrBuf * |
Str |
) |
[inline] |
Cast operator to Plain String.
- Note:
- if the buffer is altered by StrBuf operations, this pointer may become invalid. So don't lean on it after altering the buffer! Since this operation is considered cheap, rather call it often than risking your pointer to become invalid!
- Parameters:
-
| Str | the string we want to get the c-string representation for |
- Returns:
- the Pointer to the Content. Don't mess with it!
int StrLength |
( |
const StrBuf * |
Str |
) |
[inline] |
since we know strlen()'s result, provide it here.
- Parameters:
-
| Str | the string to return the length to |
- Returns:
- contentlength of the buffer