From bc42e1c4d4fc93592b7e08226192acc00ccf37bc Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 12 May 2011 16:46:29 +0000 Subject: Use conventional string lengths not including NULL terminator git-svn-id: http://svn.drobilla.net/serd/trunk@174 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- serd/serd.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'serd') diff --git a/serd/serd.h b/serd/serd.h index 5c802a79..4d87c1a3 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -200,8 +200,8 @@ typedef uint32_t SerdNodeFlags; */ typedef struct { const uint8_t* buf; /**< Value string */ - size_t n_bytes; /**< Size in bytes (including null) */ - size_t n_chars; /**< Length in characters */ + size_t n_bytes; /**< Size in bytes (not including null) */ + size_t n_chars; /**< Length in characters (not including null)*/ SerdNodeFlags flags; /**< String properties */ SerdType type; /**< Node type */ } SerdNode; @@ -247,9 +247,9 @@ typedef enum { /** UTF-8 strlen. - @return Length of @c str in characters. + @return Length of @c str in characters (except NULL). @param str A null-terminated UTF-8 string. - @param n_bytes (Output) Set to the size of @a str in bytes (incl. NULL). + @param n_bytes (Output) Set to the size of @a str in bytes (except NULL). @param flags (Output) Set to the applicable flags. */ SERD_API -- cgit v1.2.1