36#include <Inventor/C/basic.h>
46enum cc_string_constants {
47 CC_STRING_MIN_SIZE = 128 -
sizeof(
char *) +
sizeof(
size_t),
48 CC_STRING_RESIZE = 128
54 char buffer[CC_STRING_MIN_SIZE];
59typedef char (*cc_apply_f)(char);
63COIN_DLL_API
void cc_string_construct(
cc_string * me);
64COIN_DLL_API
cc_string * cc_string_construct_new(
void);
66COIN_DLL_API
void cc_string_clean(
cc_string * str);
67COIN_DLL_API
void cc_string_destruct(
cc_string * str);
70COIN_DLL_API
void cc_string_set_text(
cc_string * str,
const char * text);
71COIN_DLL_API
void cc_string_set_subtext(
cc_string * str,
const char * text,
int start,
int end);
72COIN_DLL_API
void cc_string_set_integer(
cc_string * str,
int integer);
75COIN_DLL_API
void cc_string_append_text(
cc_string * str,
const char * text);
76COIN_DLL_API
void cc_string_append_integer(
cc_string * str,
const int digits);
77COIN_DLL_API
void cc_string_append_char(
cc_string * str,
const char c);
79COIN_DLL_API
unsigned int cc_string_length(
const cc_string * str);
80COIN_DLL_API
int cc_string_is(
const cc_string * str);
81COIN_DLL_API
void cc_string_clear(
cc_string * str);
82COIN_DLL_API
void cc_string_clear_no_free(
cc_string * str);
83COIN_DLL_API uint32_t cc_string_hash(
const cc_string * str);
84COIN_DLL_API uint32_t cc_string_hash_text(
const char * text);
86COIN_DLL_API
const char * cc_string_get_text(
const cc_string * str);
87COIN_DLL_API
void cc_string_remove_substring(
cc_string * str,
int start,
int end);
90COIN_DLL_API
int cc_string_compare_text(
const char * lhs,
const char * rhs);
91COIN_DLL_API
int cc_string_compare_subtext(
const cc_string * str,
const char * text,
int offset);
93COIN_DLL_API
void cc_string_apply(
cc_string * str, cc_apply_f function);
95COIN_DLL_API
void cc_string_sprintf(
cc_string * str,
const char * formatstr, ...);
96COIN_DLL_API
void cc_string_vsprintf(
cc_string * str,
const char * formatstr, va_list args);
98COIN_DLL_API
size_t cc_string_utf8_decode(
const char * src,
size_t srclen, uint32_t * value);
99COIN_DLL_API
size_t cc_string_utf8_encode(
char * buffer,
size_t buflen, uint32_t value);
100COIN_DLL_API uint32_t cc_string_utf8_get_char(
const char * str);
101COIN_DLL_API
const char * cc_string_utf8_next_char(
const char * str);
102COIN_DLL_API
size_t cc_string_utf8_validate_length(
const char * str);
104COIN_DLL_API
void cc_string_set_wtext(
cc_string * str,
const wchar_t * text);
The cc_string type is a C ADT for ASCII string management.
Definition string.h:51