Skip to main content

Module string_ops

Module string_ops 

Source
Expand description

String operations for XPath evaluation.

This module implements XPath 2.0 string functions and normalization:

  • normalize-space
  • normalize-unicode
  • Entity reference handling
  • Whitespace normalization

Enums§

UnicodeNormalizationForm
Unicode normalization forms.

Functions§

codepoint_equal
Compare two strings by codepoint (ordinal comparison).
codepoints_to_string
Convert a sequence of codepoints to a string.
compare
Compare two strings.
concat
Concatenate strings.
contains
Check if a string contains a substring.
encode_for_uri
Encode a string for use in a URI per RFC 3986.
ends_with
Check if a string ends with a suffix.
escape_html_uri
Escape a URI for use in HTML.
iri_to_uri
Escape an IRI to produce a valid URI.
is_xml_whitespace
Check if a character is XML whitespace.
is_xml_whitespace_str
Check if a string consists entirely of XML whitespace characters.
lower_case
Convert string to lowercase.
normalize_space
Normalize whitespace in a string (XPath fn:normalize-space).
normalize_string_value
Normalize a string value with entity reference handling.
normalize_unicode
Normalize a string using Unicode normalization.
starts_with
Check if a string starts with a prefix.
string_join
Join strings with a separator.
string_length
Get the length of a string in characters.
string_to_codepoints
Convert a string to a sequence of codepoints.
substring
Get a substring (XPath-style 1-based indexing).
substring_after
Get the substring after the first occurrence of a pattern.
substring_before
Get the substring before the first occurrence of a pattern.
translate
Translate characters in a string.
upper_case
Convert string to uppercase.