W3cubDocs

/Nim

Module matchers

This module contains various string matchers for email addresses, etc.

Warning: This module is deprecated since version 0.14.0.

Imports

parseutils, strutils

Procs

proc validEmailAddress(s: string): bool {...}{.noSideEffect, gcsafe,
                                      extern: "nsuValidEmailAddress", raises: [],
                                      tags: [].}
returns true if s seems to be a valid e-mail address. The checking also uses a domain list.
proc parseInt(s: string; value: var int; validRange: HSlice[int, int]) {...}{.noSideEffect,
    gcsafe, extern: "nmatchParseInt", raises: [], tags: [].}
parses s into an integer in the range validRange. If successful, value is modified to contain the result. Otherwise no exception is raised and value is not touched; this way a reasonable default value won't be overwritten.

© 2006–2018 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/matchers.html