qstring: add qstring_get_length()

Long overdue.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Luiz Capitulino 2013-03-25 13:46:37 -04:00
parent d05ef16045
commit 54d49ac992
2 changed files with 9 additions and 0 deletions

View file

@ -31,6 +31,14 @@ QString *qstring_new(void)
return qstring_from_str("");
}
/**
* qstring_get_length(): Get the length of a QString
*/
size_t qstring_get_length(const QString *qstring)
{
return qstring->length;
}
/**
* qstring_from_substr(): Create a new QString from a C string substring
*