unicodeplus

This module provides common unicode operations

Procs

func cmpCaseless(a, b: string): bool {.inline, ...raises: [], tags: [], forbids: [].}
Caseless string comparison. Beware the strings are not normalized. This is meant for arbitrary text, do not use it to compare identifiers
func isAlnum(c: Rune): bool {....raises: [], tags: [], forbids: [].}
func isAlnum(s: seq[Rune]): bool {....deprecated: "Use isAlnum(string)",
                                   raises: [], tags: [], forbids: [].}
Deprecated: Use isAlnum(string)
func isAlnum(s: string): bool {....raises: [], tags: [], forbids: [].}
Return true if all characters in the string are alphanumeric and there is at least one character, false otherwise. A c character is alphanumeric if one of the following returns true: c.isAlpha(), c.isDecimal(), c.isDigit(), or c.isNumeric()
func isAlpha(c: Rune): bool {....raises: [], tags: [], forbids: [].}
func isAlpha(s: seq[Rune]): bool {....deprecated: "Use isAlpha(string)",
                                   raises: [], tags: [], forbids: [].}
Deprecated: Use isAlpha(string)
func isAlpha(s: string): bool {....raises: [], tags: [], forbids: [].}
Return true if all characters in the string are alphabetic and there is at least one character, false otherwise. Alphabetic characters are those characters defined in the UCD as “Letter”. This is not the same as the “Alphabetic” property defined in the UCD
func isDecimal(c: Rune): bool {....raises: [], tags: [], forbids: [].}
func isDecimal(s: seq[Rune]): bool {....deprecated: "Use isDecimal(string)",
                                     raises: [], tags: [], forbids: [].}
Deprecated: Use isDecimal(string)
func isDecimal(s: string): bool {....raises: [], tags: [], forbids: [].}
Return true if all characters in the string are decimal characters and there is at least one character, false otherwise. Decimal characters are those that can be used to form numbers in base 10, e.g. U+0660, ARABIC-INDIC DIGIT ZERO. Formally, a decimal is a character that has the property value Numeric_Type=Decimal
func isDigit(c: Rune): bool {....raises: [], tags: [], forbids: [].}
func isDigit(s: seq[Rune]): bool {....deprecated: "Use isDigit(string)",
                                   raises: [], tags: [], forbids: [].}
Deprecated: Use isDigit(string)
func isDigit(s: string): bool {....raises: [], tags: [], forbids: [].}
Return true if all characters in the string are digits and there is at least one character, false otherwise. Digits include decimal characters and digits that need special handling, such as the compatibility superscript digits. This covers digits which cannot be used to form numbers in base 10, like the Kharosthi numbers. Formally, a digit is a character that has the property value Numeric_Type=Digit or Numeric_Type=Decimal
func isLower(c: Rune): bool {....raises: [], tags: [], forbids: [].}
func isLower(s: seq[Rune]): bool {....deprecated: "Use isLower(string)",
                                   raises: [], tags: [], forbids: [].}
Deprecated: Use isLower(string)
func isLower(s: string): bool {....raises: [], tags: [], forbids: [].}
return true if all cased runes are lower-case and there is at least one cased rune
func isNumeric(c: Rune): bool {....raises: [], tags: [], forbids: [].}
func isNumeric(s: seq[Rune]): bool {....deprecated: "Use isNumeric(string)",
                                     raises: [], tags: [], forbids: [].}
Deprecated: Use isNumeric(string)
func isNumeric(s: string): bool {....raises: [], tags: [], forbids: [].}
Return true if all characters in the string are numeric, and there is at least one character, false otherwise. Numeric characters include digit characters, and all characters that have the Unicode numeric value property, e.g. U+2155, VULGAR FRACTION ONE FIFTH. Formally, numeric characters are those with the property value Numeric_Type=Digit, Numeric_Type=Decimal or Numeric_Type=Numeric
func isPrintable(c: Rune): bool {....raises: [], tags: [], forbids: [].}
func isPrintable(s: seq[Rune]): bool {....deprecated: "Use isPrintable(string)",
                                       raises: [], tags: [], forbids: [].}
Deprecated: Use isPrintable(string)
func isPrintable(s: string): bool {....raises: [], tags: [], forbids: [].}
Nonprintable characters are those characters defined in the UCD as “Other” or “Separator”, except for the ASCII space (0x20). Return true if all characters meet this condition or the string is empty
func isTitle(c: Rune): bool {....raises: [], tags: [], forbids: [].}
Return true for ligatures containing uppercase followed by lowercase letters (e.g., Dž, Lj, Nj, and Dz). Return false otherwise
func isTitle(s: seq[Rune]): bool {....deprecated: "Use isTitle(string)",
                                   raises: [], tags: [], forbids: [].}
Deprecated: Use isTitle(string)
func isTitle(s: string): bool {....raises: [], tags: [], forbids: [].}
A title is a unicode sequence of uncased characters followed by an uppercase character and cased characters followed by a lowercase character. Return false if the string is empty
func isUpper(c: Rune): bool {....raises: [], tags: [], forbids: [].}
func isUpper(s: seq[Rune]): bool {....deprecated: "Use isUpper(string)",
                                   raises: [], tags: [], forbids: [].}
Deprecated: Use isUpper(string)
func isUpper(s: string): bool {....raises: [], tags: [], forbids: [].}
return true if all cased runes are upper-case and there is at least one cased rune
func isWhiteSpace(c: Rune): bool {....raises: [], tags: [], forbids: [].}
func isWhiteSpace(s: seq[Rune]): bool {....deprecated: "Use isWhiteSpace(string)",
                                        raises: [], tags: [], forbids: [].}
Deprecated: Use isWhiteSpace(string)
func isWhiteSpace(s: string): bool {....raises: [], tags: [], forbids: [].}
Whitespace characters are those characters defined in the Unicode character database as “Other” or “Separator” and those with bidirectional property being one of “WS”, “B”, or “S”. Return true if all characters meet this condition. Return false if the string is empty
func toLower(s: string): string {.inline, ...raises: [], tags: [], forbids: [].}
Return s in lower case. Beware the result may be longer than s
func toTitle(s: string): string {.inline, ...raises: [], tags: [], forbids: [].}
Return s in title case. Beware the result may be longer than s
func toUpper(s: string): string {.inline, ...raises: [], tags: [], forbids: [].}
Return s in upper case. Beware the result may be longer than s
func toValidUtf8(s: string; replacement = "�"): string {....raises: [], tags: [],
    forbids: [].}
Return s with all invalid utf-8 bytes replaced by the replacement value.
func verifyUtf8(s: openArray[char]): int {....raises: [], tags: [], forbids: [].}
Returns the position of the invalid byte in s if the string s does not hold valid UTF-8 data. Otherwise -1 is returned.