Libcroco
Data Structures | Typedefs | Functions
cr-string.h File Reference

Declaration file of the CRString class. More...

#include <glib.h>
#include "cr-utils.h"
#include "cr-parsing-location.h"

Go to the source code of this file.

Data Structures

struct  _CRString
 This is a ship implementation of string based on GString. More...

Typedefs

typedef typedefG_BEGIN_DECLS
struct _CRString 
CRString

Functions

CRStringcr_string_new (void)
 Instanciates a CRString.
CRStringcr_string_new_from_string (const gchar *a_string)
 Instanciate a string and initialise it to a_string.
CRStringcr_string_new_from_gstring (GString const *a_string)
 Instanciates a CRString from an instance of GString.
CRStringcr_string_dup (CRString const *a_this)
gchar * cr_string_dup2 (CRString const *a_this)
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.
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.
void cr_string_destroy (CRString *a_this)

Detailed Description

Declaration file of the CRString class.

Definition in file cr-string.h.


Typedef Documentation

typedef typedefG_BEGIN_DECLS struct _CRString CRString

Definition at line 37 of file cr-string.h.


Function Documentation

void cr_string_destroy ( CRString a_this)
CRString* cr_string_dup ( CRString const *  a_this)
gchar* cr_string_dup2 ( CRString const *  a_this)

Definition at line 110 of file cr-string.c.

CRString* cr_string_new ( void  )

Instanciates a CRString.

Returns:
the newly instanciated CRString Must be freed with cr_string_destroy().

Definition at line 33 of file cr-string.c.

References cr_utils_trace_info.

Referenced by cr_string_new_from_gstring(), and cr_string_new_from_string().

CRString* cr_string_new_from_gstring ( GString const *  a_string)

Instanciates a CRString from an instance of GString.

Parameters:
a_stringthe input string that will be copied into the newly instanciated CRString
Returns:
the newly instanciated CRString.

Definition at line 75 of file cr-string.c.

References cr_string_new(), and cr_utils_trace_info.

Referenced by cr_string_dup().

CRString* cr_string_new_from_string ( const gchar *  a_string)

Instanciate a string and initialise it to a_string.

Parameters:
a_stringthe initial string
Returns:
the newly instanciated string.

Definition at line 54 of file cr-string.c.

References cr_string_new(), and cr_utils_trace_info.

Referenced by cr_parser_parse_prio().

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.

Parameters:
a_thisthe current instance of CRString

Definition at line 131 of file cr-string.c.

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.

Parameters:
a_thisthe current instance of CRString.
Returns:
the len of the internal raw NULL termninated string, of -1 if no length can be returned.

Definition at line 148 of file cr-string.c.