]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: add virTrimSpaces
authorEric Blake <eblake@redhat.com>
Wed, 29 Jun 2011 17:47:08 +0000 (11:47 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 6 Jul 2011 21:17:14 +0000 (15:17 -0600)
commit01374ec8b1a0b1f187a51d42ce9cfd7ee45e688c
tree19ff03b6bce99f270123f8cadbad5dac696f1180
parent82162316b6cb6cc1b55320d903dee1b55e29c338
util: add virTrimSpaces

The next patch wants to adjust an end pointer to trim trailing
spaces but without modifying the underlying string, but a more
generally useful ability to trim trailing spaces in place is
also worth providing.

* src/util/util.h (virTrimSpaces, virSkipSpacesBackwards): New
prototypes.
* src/util/util.c (virTrimSpaces, virSkipSpacesBackwards): New
functions.
* src/libvirt_private.syms (util.h): Export new functions.
Inspired by a patch by Minoru Usui.
src/libvirt_private.syms
src/util/util.c
src/util/util.h