diff options
| author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-13 07:19:10 +0100 |
|---|---|---|
| committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-13 07:19:10 +0100 |
| commit | fa47eeda2b3c188c4c74119c843b87062fd93061 (patch) | |
| tree | 3aa84c124453d35707ddde5ab65965ce49918822 /sciteco.h | |
| parent | dba9cbb38fd014bdddf1aed6905ec04faeb1dcf3 (diff) | |
added support for string match characters (match spec to regexp compiler)
Diffstat (limited to 'sciteco.h')
| -rw-r--r-- | sciteco.h | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -35,4 +35,23 @@ sptr_t editor_msg(unsigned int iMessage, uptr_t wParam = 0, sptr_t lParam = 0); /* TECO uses only lower 7 bits for commands */ #define MAX_TRANSITIONS 127 -#endif
\ No newline at end of file +namespace String { + +static inline void +append(gchar *&str1, const gchar *str2) +{ + /* FIXME: optimize */ + gchar *new_str = g_strconcat(str1 ? : "", str2, NULL); + g_free(str1); + str1 = new_str; +} + +static inline void +append(gchar *&str, gchar chr) +{ + append(str, (gchar []){chr, '\0'}); +} + +} /* namespace String */ + +#endif |
