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>
#include "strliteral.h"

Go to the source code of this file.

Macros

#define strInit(o)   *(o) = NULL
 
#define strTemp(ps, maxlen)
 

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)
 
bool strFromBytes (strhandle o, _In_reads_bytes_opt_(sz) const void *buf, uint32 sz)
 
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.