GLib String support


Following my previous e-mail I'll present were my ideas for changing the support for strings in GLIb.

When I look at the string functions in Glib there is a lot of inconsistency: error checking, what character set is supported and function naming; so I'm proposing to change, at least, the function naming system to something like:

# g_ascii/loc/utf8_str[n]%function%
# loc - uses current locale
# ascii - uses ascii
# utf8 - uses utf-8
# if n is specified it indicates that the function is limited by length
# %function% - dup, cpy, cat, len, pre, suf, strip, ...

Because there's a lot of changes this will only make part of the 3.0 release (I think).
To minimize code length a macro can be used to set the default encoding (ascii/loc/utf8).
As I change the naming system I'll optimize existing code and error checking (if needed).

Please comment, I would like to know if I should proceed with this idea or not...


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