Skip to main content

dict_lookup

Function dict_lookup 

Source
pub unsafe fn dict_lookup(
    dict: *mut Dict,
    name: *const xmlChar,
    len: c_int,
) -> *const xmlChar
Expand description

Look up a string in the dictionary, adding it if not found.

§UPSTREAM-PARITY

const xmlChar *xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len);

If len < 0, the string is assumed to be null-terminated and its length is computed via strlen. If len >= 0, exactly len bytes are used.

Returns a pointer to the interned string, or NULL on failure. The returned pointer is valid for the lifetime of the dictionary.

§SAFETY

  • dict must be a valid pointer to a Dict, or NULL.
  • name must be a valid pointer to a null-terminated string (if len < 0) or a buffer of at least len bytes (if len >= 0).