Code

data: Added sdb_data_strlen.
[sysdb.git] / src / include / core / data.h
index c7c51b830c3761f91bb0ff55736a26087fb560e1..54a2ed2d0d703bec5e227dfaafa53ad136753781 100644 (file)
@@ -101,6 +101,15 @@ sdb_data_copy(sdb_data_t *dst, const sdb_data_t *src);
 void
 sdb_data_free_datum(sdb_data_t *datum);
 
+/*
+ * sdb_data_strlen:
+ * Returns a (worst-case) estimate for the number of bytes required to format
+ * the datum as a string. Does not take the terminating null byte into
+ * account.
+ */
+size_t
+sdb_data_strlen(sdb_data_t *datum);
+
 /*
  * sdb_data_format:
  * Append the specified datum to the specified string buffer using a default