CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
strbase.h File Reference

Core string types and fundamental operations. More...

#include <cx/cx.h>

Go to the source code of this file.

Macros

#define strInit(o)   *(o) = NULL
 
#define strTemp(ps, maxlen)
 
#define _S
 Creates a static ASCII string from a string literal.
 
#define _SU
 Creates a static UTF-8 string from a string literal.
 
#define _SO
 Creates a static string with other/unknown encoding from a literal.
 

Typedefs

typedef struct str_ref * string
 Opaque handle to a string object.
 
typedef const struct str_ref * strref
 Borrowed reference to a string.
 
typedef string * strhandle
 Pointer to a string variable.
 

Functions

void strReset (strhandle o, uint32 sizehint)
 
void strDup (strhandle o, strref s)
 
void strCopy (strhandle o, strref s)
 
void strClear (strhandle ps)
 
uint32 strLen (strref s)
 
void strSetLen (strhandle ps, uint32 len)
 
bool strEmpty (strref s)
 
void strDestroy (strhandle ps)
 
const char * strC (strref s)
 
const char * strPC (strhandle ps)
 
uint8 * strBuffer (strhandle ps, uint32 minsz)
 
uint32 strCopyOut (strref s, uint32 off, uint8 *buf, uint32 bufsz)
 
uint32 strCopyRaw (strref s, uint32 off, uint8 *buf, uint32 maxlen)
 

Detailed Description

Core string types and fundamental operations.

Definition in file strbase.h.