string handling: strlen for gstring
[exim.git] / src / src / functions.h
index fe15cc573251b6ca2fa3a21bce8b77a2608d3a5e..7677a3cd95e390e4ac32252477b40c94d6945aa3 100644 (file)
@@ -820,6 +820,12 @@ g->s[g->ptr] = '\0';
 return g->s;
 }
 
+static inline unsigned
+gstring_length(const gstring * g)
+{
+return g ? (unsigned)g->ptr : 0;
+}
+
 
 #define gstring_release_unused(g) \
        gstring_release_unused_trc(g, __FUNCTION__, __LINE__)