mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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:
parent
d05ef16045
commit
54d49ac992
2 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue