## cr-utils cr-utils |

## Synopsis

    #define             CROCO_LOG_DOMAIN
    #define             cr_utils_trace                      (a_log_level,
                                                             a_msg)
    #define             cr_utils_trace_info                 (a_msg)
    #define             cr_utils_trace_debug                (a_msg)
    enum CRStatus       cr_utils_read_char_from_utf8_buf    (const guchar *a_in,
                                                             gulong a_in_len,
                                                             guint32 *a_out,
                                                             gulong *a_consumed);
    enum CRStatus       cr_utils_ucs1_to_utf8               (const guchar *a_in,
                                                             gulong *a_in_len,
                                                             guchar *a_out,
                                                             gulong *a_out_len);
    enum CRStatus       cr_utils_utf8_to_ucs1               (const guchar *a_in,
                                                             gulong *a_in_len,
                                                             guchar *a_out,
                                                             gulong *a_out_len);
    enum CRStatus       cr_utils_ucs4_to_utf8               (const guint32 *a_in,
                                                             gulong *a_in_len,
                                                             guchar *a_out,
                                                             gulong *a_out_len);
    enum CRStatus       cr_utils_utf8_str_len_as_ucs4       (const guchar *a_in_start,
                                                             const guchar *a_in_end,
                                                             gulong *a_len);
    enum CRStatus       cr_utils_ucs1_str_len_as_utf8       (const guchar *a_in_start,
                                                             const guchar *a_in_end,
                                                             gulong *a_len);
    enum CRStatus       cr_utils_utf8_str_len_as_ucs1       (const guchar *a_in_start,
                                                             const guchar *a_in_end,
                                                             gulong *a_len);
    enum CRStatus       cr_utils_ucs4_str_len_as_utf8       (const guint32 *a_in_start,
                                                             const guint32 *a_in_end,
                                                             gulong *a_len);
    enum CRStatus       cr_utils_ucs1_str_to_utf8           (const guchar *a_in_start,
                                                             gulong *a_in_len,
                                                             guchar **a_out,
                                                             gulong *a_len);
    enum CRStatus       cr_utils_utf8_str_to_ucs1           (const guchar *a_in_start,
                                                             gulong *a_in_len,
                                                             guchar **a_out,
                                                             gulong *a_out_len);
    enum CRStatus       cr_utils_utf8_to_ucs4               (const guchar *a_in,
                                                             gulong *a_in_len,
                                                             guint32 *a_out,
                                                             gulong *a_out_len);
    enum CRStatus       cr_utils_ucs4_str_to_utf8           (const guint32 *a_in,
                                                             gulong *a_in_len,
                                                             guchar **a_out,
                                                             gulong *a_out_len);
    enum CRStatus       cr_utils_utf8_str_to_ucs4           (const guchar *a_in,
                                                             gulong *a_in_len,
                                                             guint32 **a_out,
                                                             gulong *a_out_len);
    gboolean            cr_utils_is_newline                 (guint32 a_char);
    gboolean            cr_utils_is_white_space             (guint32 a_char);
    gboolean            cr_utils_is_nonascii                (guint32 a_char);
    gboolean            cr_utils_is_hexa_char               (guint32 a_char);
    void                cr_utils_dump_n_chars               (guchar a_char,
                                                             FILE *a_fp,
                                                             glong a_nb);
    void                cr_utils_dump_n_chars2              (guchar a_char,
                                                             GString *a_string,
                                                             glong a_nb);
    GList *             cr_utils_dup_glist_of_string        (GList const *a_list);
    GList *             cr_utils_dup_glist_of_cr_string     (GList const *a_list_of_strings);

## Description

## Details

### CROCO_LOG_DOMAIN

    #define CROCO_LOG_DOMAIN "LIBCROCO"

### cr_utils_trace()

    #define             cr_utils_trace(a_log_level, a_msg)

`a_log_level` : |
`a_msg` : |

### cr_utils_trace_info()

    #define             cr_utils_trace_info(a_msg)

`a_msg` : |

### cr_utils_trace_debug()

    #define             cr_utils_trace_debug(a_msg)

`a_msg` : |

### cr_utils_read_char_from_utf8_buf ()

    enum CRStatus       cr_utils_read_char_from_utf8_buf    (const guchar *a_in,
                                                             gulong a_in_len,
                                                             guint32 *a_out,
                                                             gulong *a_consumed);

`a_in` : |
`a_in_len` : |
`a_out` : |
`a_consumed` : |
Returns : |

### cr_utils_ucs1_to_utf8 ()

    enum CRStatus       cr_utils_ucs1_to_utf8               (const guchar *a_in,
                                                             gulong *a_in_len,
                                                             guchar *a_out,
                                                             gulong *a_out_len);

`a_in` : |
`a_in_len` : |
`a_out` : |
`a_out_len` : |
Returns : |

### cr_utils_utf8_to_ucs1 ()

    enum CRStatus       cr_utils_utf8_to_ucs1               (const guchar *a_in,
                                                             gulong *a_in_len,
                                                             guchar *a_out,
                                                             gulong *a_out_len);

`a_in` : |
`a_in_len` : |
`a_out` : |
`a_out_len` : |
Returns : |

### cr_utils_ucs4_to_utf8 ()

    enum CRStatus       cr_utils_ucs4_to_utf8               (const guint32 *a_in,
                                                             gulong *a_in_len,
                                                             guchar *a_out,
                                                             gulong *a_out_len);

`a_in` : |
`a_in_len` : |
`a_out` : |
`a_out_len` : |
Returns : |

### cr_utils_utf8_str_len_as_ucs4 ()

    enum CRStatus       cr_utils_utf8_str_len_as_ucs4       (const guchar *a_in_start,
                                                             const guchar *a_in_end,
                                                             gulong *a_len);

`a_in_start` : |
`a_in_end` : |
`a_len` : |
Returns : |

### cr_utils_ucs1_str_len_as_utf8 ()

    enum CRStatus       cr_utils_ucs1_str_len_as_utf8       (const guchar *a_in_start,
                                                             const guchar *a_in_end,
                                                             gulong *a_len);

`a_in_start` : |
`a_in_end` : |
`a_len` : |
Returns : |

### cr_utils_utf8_str_len_as_ucs1 ()

    enum CRStatus       cr_utils_utf8_str_len_as_ucs1       (const guchar *a_in_start,
                                                             const guchar *a_in_end,
                                                             gulong *a_len);

`a_in_start` : |
`a_in_end` : |
`a_len` : |
Returns : |

### cr_utils_ucs4_str_len_as_utf8 ()

    enum CRStatus       cr_utils_ucs4_str_len_as_utf8       (const guint32 *a_in_start,
                                                             const guint32 *a_in_end,
                                                             gulong *a_len);

`a_in_start` : |
`a_in_end` : |
`a_len` : |
Returns : |

### cr_utils_ucs1_str_to_utf8 ()

    enum CRStatus       cr_utils_ucs1_str_to_utf8           (const guchar *a_in_start,
                                                             gulong *a_in_len,
                                                             guchar **a_out,
                                                             gulong *a_len);

`a_in_start` : |
`a_in_len` : |
`a_out` : |
`a_len` : |
Returns : |

### cr_utils_utf8_str_to_ucs1 ()

    enum CRStatus       cr_utils_utf8_str_to_ucs1           (const guchar *a_in_start,
                                                             gulong *a_in_len,
                                                             guchar **a_out,
                                                             gulong *a_out_len);

`a_in_start` : |
`a_in_len` : |
`a_out` : |
`a_out_len` : |
Returns : |

### cr_utils_utf8_to_ucs4 ()

    enum CRStatus       cr_utils_utf8_to_ucs4               (const guchar *a_in,
                                                             gulong *a_in_len,
                                                             guint32 *a_out,
                                                             gulong *a_out_len);

`a_in` : |
`a_in_len` : |
`a_out` : |
`a_out_len` : |
Returns : |

### cr_utils_ucs4_str_to_utf8 ()

    enum CRStatus       cr_utils_ucs4_str_to_utf8           (const guint32 *a_in,
                                                             gulong *a_in_len,
                                                             guchar **a_out,
                                                             gulong *a_out_len);

`a_in` : |
`a_in_len` : |
`a_out` : |
`a_out_len` : |
Returns : |

### cr_utils_utf8_str_to_ucs4 ()

    enum CRStatus       cr_utils_utf8_str_to_ucs4           (const guchar *a_in,
                                                             gulong *a_in_len,
                                                             guint32 **a_out,
                                                             gulong *a_out_len);

`a_in` : |
`a_in_len` : |
`a_out` : |
`a_out_len` : |
Returns : |

### cr_utils_is_newline ()

    gboolean            cr_utils_is_newline                 (guint32 a_char);

`a_char` : |
Returns : |

### cr_utils_is_white_space ()

    gboolean            cr_utils_is_white_space             (guint32 a_char);

`a_char` : |
Returns : |

### cr_utils_is_nonascii ()

    gboolean            cr_utils_is_nonascii                (guint32 a_char);

`a_char` : |
Returns : |

### cr_utils_is_hexa_char ()

    gboolean            cr_utils_is_hexa_char               (guint32 a_char);

`a_char` : |
Returns : |

### cr_utils_dump_n_chars ()

    void                cr_utils_dump_n_chars               (guchar a_char,
                                                             FILE *a_fp,
                                                             glong a_nb);

`a_char` : |
`a_fp` : |
`a_nb` : |

### cr_utils_dump_n_chars2 ()

    void                cr_utils_dump_n_chars2              (guchar a_char,
                                                             GString *a_string,
                                                             glong a_nb);

`a_char` : |
`a_string` : |
`a_nb` : |

### cr_utils_dup_glist_of_string ()

    GList *             cr_utils_dup_glist_of_string        (GList const *a_list);

`a_list` : |
Returns : |

### cr_utils_dup_glist_of_cr_string ()

    GList *             cr_utils_dup_glist_of_cr_string     (GList const *a_list_of_strings);

`a_list_of_strings` : |
Returns : |