37 result = g_try_malloc (
sizeof (
CRString)) ;
42 memset (result, 0,
sizeof (
CRString)) ;
43 result->stryng = g_string_new (NULL) ;
64 g_string_append (result->stryng, a_string) ;
85 g_string_append_len (result->stryng,
97 g_return_val_if_fail (a_this, NULL) ;
112 gchar *result = NULL ;
114 g_return_val_if_fail (a_this, NULL) ;
118 && a_this->stryng->str) {
119 result = g_strndup (a_this->stryng->str,
120 a_this->stryng->len) ;
133 g_return_val_if_fail (a_this, NULL) ;
135 if (a_this->stryng && a_this->stryng->str)
136 return a_this->stryng->str ;
150 g_return_val_if_fail (a_this && a_this->stryng,
152 return a_this->stryng->len ;
161 g_return_if_fail (a_this) ;
163 if (a_this->stryng) {
164 g_string_free (a_this->stryng, TRUE) ;
165 a_this->stryng = NULL ;
void cr_string_destroy(CRString *a_this)
CRString * cr_string_new(void)
Instanciates a CRString.
Declaration file of the CRString class.
CRString * cr_string_new_from_string(const gchar *a_string)
Instanciate a string and initialise it to a_string.
gchar * cr_string_dup2(CRString const *a_this)
CRString * cr_string_dup(CRString const *a_this)
typedefG_BEGIN_DECLS struct _CRString CRString
gint cr_string_peek_raw_str_len(CRString const *a_this)
Returns the length of the internal raw NULL terminated string of the current instance of CRString.
const gchar * cr_string_peek_raw_str(CRString const *a_this)
Returns a pointer to the internal raw NULL terminated string of the current instance of CRString.
CRString * cr_string_new_from_gstring(GString const *a_string)
Instanciates a CRString from an instance of GString.
enum CRStatus cr_parsing_location_copy(CRParsingLocation *a_to, CRParsingLocation const *a_from)
cr_parsing_location_copy: @a_to: the destination of the copy.
#define cr_utils_trace_info(a_msg)
Traces an info message.