src/regex/common

Types

RegexError = object of ValueError

Consts

invalidRune = -1'i32
lineBreakRune = 10'i32

Procs

proc `%%`(formatstr: string; a: openArray[string]): string {.noSideEffect,
    ...raises: [], tags: [].}
same as "$#" % ["foo"] but returns empty string on error
proc `%%`(formatstr: string; a: string): string {....raises: [], tags: [].}
proc `<=`(x, y: Rune): bool {....raises: [], tags: [].}
func bwRuneAt(s: string; n: int): Rune {....raises: [], tags: [].}
Take rune ending at n
proc cmp(x, y: Rune): int {....raises: [], tags: [].}
proc toRune(s: string): Rune {....raises: [], tags: [].}
func verifyUtf8(s: string): int {....raises: [], tags: [].}
Return -1 if s is a valid utf-8 string. Otherwise, return the index of the first bad char.

Templates

template bwFastRuneAt(s: string; n: var int; result: var Rune): untyped
Take rune ending at n