Expand description
String utility functions for libxml-rs.
Provides operations on xmlChar* (i.e. *mut u8) strings compatible
with upstream libxml2’s string handling.
Functions§
- build_
qname ⚠ - Build a QName
prefix:local(upstream tree.cxmlBuildQName): writes intomemorywhen it is large enough, otherwise allocates. Returns the resulting string (allocator-owned when notmemory), or NULL on error. A NULL prefix returnsncnameunchanged. - check_
utf8 ⚠ - Check that a byte string is valid UTF-8 (upstream
xmlCheckUTF8): returns 1 when valid, 0 otherwise. - split_
qname2 ⚠ - Split a QName into prefix and local part (upstream tree.c
xmlSplitQName2): returns NULL when the name has no prefix (or starts with ‘:’), otherwise allocates*prefixwith the prefix and returns the local part. - split_
qname3 ⚠ - Split a QName returning the prefix length (upstream tree.c
xmlSplitQName3): returns the length of the prefix (before ‘:’), or 0 when there is no prefix.namemust not start with ‘:’. - utf8_
size ⚠ - Size in bytes of the UTF-8 sequence starting at
utf(upstreamxmlUTF8Size): returns the sequence length, or -1 on invalid leading byte, 0 on NUL. - utf8_
strlen ⚠ - Return the number of UTF-8 characters in a string (upstream
xmlUTF8Strlen).