src/cx/string.h

changeset 577
26447d59a5ab
parent 576
ba0c4ff6698e
child 578
0b2c0cb280a9
equal deleted inserted replaced
576:ba0c4ff6698e 577:26447d59a5ab
41 #include "allocator.h" 41 #include "allocator.h"
42 42
43 /** 43 /**
44 * The UCX string structure. 44 * The UCX string structure.
45 */ 45 */
46 struct { 46 struct cx_mutstr_s {
47 /** 47 /**
48 * A pointer to the string. 48 * A pointer to the string.
49 * \note The string is not necessarily \c NULL terminated. 49 * \note The string is not necessarily \c NULL terminated.
50 * Always use the length. 50 * Always use the length.
51 */ 51 */
52 char *ptr; 52 char *ptr;
53 /** The length of the string */ 53 /** The length of the string */
54 size_t length; 54 size_t length;
55 } cx_mutstr_s; 55 };
56 56
57 /** 57 /**
58 * A mutable string. 58 * A mutable string.
59 */ 59 */
60 typedef struct cx_mutstr_s cxmutstr; 60 typedef struct cx_mutstr_s cxmutstr;
61 61
62 /** 62 /**
63 * The UCX string structure for immutable (constant) strings. 63 * The UCX string structure for immutable (constant) strings.
64 */ 64 */
65 struct { 65 struct cx_string_s {
66 /** 66 /**
67 * A pointer to the immutable string. 67 * A pointer to the immutable string.
68 * \note The string is not necessarily \c NULL terminated. 68 * \note The string is not necessarily \c NULL terminated.
69 * Always use the length. 69 * Always use the length.
70 */ 70 */
71 char const *ptr; 71 char const *ptr;
72 /** The length of the string */ 72 /** The length of the string */
73 size_t length; 73 size_t length;
74 } cx_string_s; 74 };
75 75
76 /** 76 /**
77 * An immutable string. 77 * An immutable string.
78 */ 78 */
79 typedef struct cx_string_s cxstring; 79 typedef struct cx_string_s cxstring;

mercurial