src/regex/common

Types

RegexError = object of ValueError
SortedSeq[T] = object
  s: seq[T]

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: [].}
func `<=`(x, y: Rune): bool {....raises: [], tags: [].}
func add[T](s: var SortedSeq[T]; x: openArray[T])
func bwRuneAt(s: string; n: int): Rune {....raises: [], tags: [].}
Take rune ending at n
func cmp(x, y: Rune): int {....raises: [], tags: [].}
func contains[T](s: SortedSeq[T]; x: T): bool
func initSortedSeq[T](): SortedSeq[T] {.inline.}
func len[T](s: SortedSeq[T]): int {.inline.}
func toRune(c: char): 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.

Iterators

iterator items[T](s: SortedSeq[T]): T {.inline.}

Templates

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