libcstl
Loading...
Searching...
No Matches
Macros
string.h File Reference

Go to the source code of this file.

Macros

#define CSTL_STRING_INITIALIZER(CTYPE)
 Constant initialization of a string object.
 
#define DECLARE_CSTL_STRING(TYPE, NAME)
 (Statically) declare and initialize a vector
 

Typedefs

Supported string types
typedef struct cstl_string cstl_string_t
 String of narrow characters.
 
typedef struct cstl_wstring cstl_wstring_t
 String of wide characters.
 

Detailed Description

This is the public-facing header for string objects. The actual implementation is in _string.[ch], hidden behind a lot of macros that function as a poor man's template. This allows the same code to implement both narrow and wide character string objects.

This file sets the cstl_STRING, STRCHAR, and STDSTRPFX macros, and then includes the actual implementation file to import all of its types, functions, and prototypes.

To add new variants:

See also
_string.h for the templatized string object header

Definition in file string.h.