diff options
Diffstat (limited to 'src/sciteco.h')
-rw-r--r-- | src/sciteco.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sciteco.h b/src/sciteco.h index 5ea5107..65b8e9a 100644 --- a/src/sciteco.h +++ b/src/sciteco.h @@ -91,6 +91,17 @@ append(gchar *&str, gchar chr) void get_coord(const gchar *str, gint pos, gint &line, gint &column); +static inline gsize +diff(const gchar *a, const gchar *b) +{ + gsize len = 0; + + while (*a != '\0' && *a++ == *b++) + len++; + + return len; +} + } /* namespace String */ namespace Validate { |