Macros§
- rumtk_
format - Creates a
CompactStringusing interpolation of runtime expressions.
Structs§
- Compact
String - A
CompactStringis a compact string type that can be used almost anywhere aStringorstrcan be used. - Grapheme
Str - The equivalent to a
stringviewbut at the grapheme level. Meaning, we can use this view to iterate through a string at the fullUTF8implementation
Constants§
Traits§
- AsStr
- Compact
String Ext - A trait that provides convenience methods for creating a
CompactStringfrom a collection of items. It is implemented for all types that can be converted into an iterator, and that iterator yields types that can be converted into astr. - RUMArray
Conversions - RUMString
Conversions - String
Like - String
Utils - ToCompact
String - A trait for converting a value to a
CompactString.
Functions§
- basic_
escape - Escape UTF-8 characters in UTF-8 string that are beyond ascii range
- count_
tokens_ ignoring_ pattern - escape
- Turn UTF-8 character into escaped character sequence as expected in HL7
- filter_
ascii - Removes all non ASCII and all non printable characters from string.
- filter_
non_ printable_ ascii - Removes all non ASCII and all non printable characters from string.
- get_
grapheme_ collection - Return vector of graphemes from starting spot up until we find the end grapheme.
- get_
grapheme_ string - Get the grapheme block and concatenate it into a newly allocated
RUMString. - is_
ascii_ str - Checks if a given string is fully ASCII or within the ASCII range.
- is_
escaped_ str - Checks if an input string is already escaped. The idea is to avoid escaping the escaped string thus making it a nightmare to undo the escaping later on.
- is_
printable_ char - Returns whether a character is in the ASCII printable range.
- try_
decode - Implements decoding this string from its auto-detected encoding to UTF-8. Failing that we assume the string was encoded in UTF-8 and return a copy.
- try_
decode_ with - Implements decoding this string from a specific encoding to UTF-8.
- unescape
- Turn escaped character sequence into the equivalent UTF-8 character This function accepts \o, \x and \u formats. This function will also attempt to unescape the common C style control characters. Anything else needs to be expressed as hex or octal patterns with the formats above.
- unescape_
string - This function will scan through an escaped string and unescape any escaped characters. We collect these characters as a byte vector. Finally, we do a decode pass on the vector to re-encode the bytes hopefully right into a valid UTF-8 string.