Re: GLib String support

(Duo to a mistake I'm re-sending this message...)

>        struct _GString
>        {
>          gchar  *str;
>          gsize len;
>          gsize allocated_len;
>          gboolean tainted : 1;
>        };
> Let's add the important g_utf8_ functions to g_string, and let them
> operate without validation when tainted is false.

  * dup
  * cat
  * len
  * cpy (~== dup)
  * strchr
  * strstr

I think this are the most important (not in order). Although the isSomething functions could also make part of it.

The following functions I don't know if they are as much important but I'll list them just in case:
  * strip
    - stripl (leading)
    - stript (trailing)
  * str_has_prefix
  * str_has_suffix
  * fill
  * rev (reverse)
  * split

For some of this functions there are some variations:
  * limited buffer
  * limited number of characters

Some function must have slip me...

Best regards...

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]