src/unicody

Source   Edit  

Consts

highSurrogateMax = 0x0000DBFF'i32
Source   Edit  
highSurrogateMin = 0x0000D800'i32
Source   Edit  
lowSurrogateMax = 0x0000DFFF'i32
Source   Edit  
lowSurrogateMin = 0x0000DC00'i32
Source   Edit  
replacementRune = 65533'i32
Source   Edit  
utf8Max = 0x0010FFFF'i32
Source   Edit  

Procs

proc `$`(rune: Rune): string {.inline, ...raises: [CatchableError], tags: [],
                               forbids: [].}
Source   Edit  
proc `$`(runes: seq[Rune]): string {....raises: [CatchableError], tags: [],
                                     forbids: [].}
Source   Edit  
proc add(s: var string; rune: Rune) {....raises: [CatchableError], tags: [],
                                      forbids: [].}
Adds the rune to the string. Source   Edit  
proc containsControlCharacter(s: openArray[char]): bool {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc find(s: openArray[char]; needle: char; start = 0; last = -1): int {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc find(s: openArray[char]; needle: string; start = 0; last = -1): int {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc runeAt(s: openArray[char]; i: int): Rune {....raises: [CatchableError],
    tags: [], forbids: [].}
Source   Edit  
proc size(rune: Rune): int {....raises: [CatchableError], tags: [], forbids: [].}
Returns the number of bytes the rune takes. Source   Edit  
proc toUTF8(rune: Rune): string {.inline, ...raises: [CatchableError], tags: [],
                                  forbids: [].}
Source   Edit  
proc truncateUtf8(s: openArray[char]; maxBytes: int): string {.
    ...raises: [CatchableError], tags: [], forbids: [].}
Source   Edit  
proc unsafeAdd(s: var string; rune: Rune) {....raises: [], tags: [], forbids: [].}
Adds the rune to the string without checking if the rune is valid. Source   Edit  
proc validateUtf8(s: openArray[char]): int {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc validRuneAt(s: openArray[char]; i: int): Option[Rune] {....raises: [],
    tags: [], forbids: [].}
Source   Edit  

Templates

template `==`(a, b: Rune): bool
Source   Edit  
template isHighSurrogate(rune: Rune): bool
Source   Edit  
template isLowSurrogate(rune: Rune): bool
Source   Edit  
template isSurrogate(rune: Rune): bool
Source   Edit  
template isValid(rune: Rune): bool
Source   Edit  
template unsafeSize(rune: Rune): int
Returns the number of bytes the rune takes without checking if the rune is valid. Source   Edit