libdom
Loading...
Searching...
No Matches
string.h File Reference
#include <dom/core/string.h>

Go to the source code of this file.

Enumerations

enum  dom_whitespace_op {
  DOM_WHITESPACE_STRIP_LEADING = (1 << 0) , DOM_WHITESPACE_STRIP_TRAILING = (1 << 1) , DOM_WHITESPACE_STRIP , DOM_WHITESPACE_COLLAPSE = (1 << 2) ,
  DOM_WHITESPACE_STRIP_COLLAPSE
}
 

Functions

dom_exception _dom_exception_from_lwc_error (lwc_error err)
 
dom_exception dom_string_whitespace_op (dom_string *s, enum dom_whitespace_op op, dom_string **ret)
 

Enumeration Type Documentation

◆ dom_whitespace_op

Enumerator
DOM_WHITESPACE_STRIP_LEADING 
DOM_WHITESPACE_STRIP_TRAILING 
DOM_WHITESPACE_STRIP 
DOM_WHITESPACE_COLLAPSE 
DOM_WHITESPACE_STRIP_COLLAPSE 

Function Documentation

◆ _dom_exception_from_lwc_error()

dom_exception _dom_exception_from_lwc_error ( lwc_error err)

Convert a lwc_error to a dom_exception

Parameters
errThe input lwc_error
Returns
the dom_exception

◆ dom_string_whitespace_op()

dom_exception dom_string_whitespace_op ( dom_string * s,
enum dom_whitespace_op op,
dom_string ** ret )

Perform whitespace operations on given string

Parameters
sGiven string
opWhitespace operation(s) to perform
retNew string with whitespace ops performed. Caller owns ref
Returns
DOM_NO_ERR on success.
Note
Right now, will return DOM_NOT_SUPPORTED_ERR if ascii_only is false.