Skip to content

Index of Module sanestring

Dustin edited this page Mar 20, 2015 · 3 revisions

Module: sanestring

The sanestring module contains procedures for testing that strings meet specific patterns. These procedures make use of the pregexp module. All procedures return false when the conditions are not met.

Functions in this module:

Function Short Description
(sanestring-alpha s) Returns true if the string contains only letters
(sanestring-alphanum s) Returns true if the string contains only letter and numbers
(sanestring-capostal s) Returns true if the string is a valid Canadian postal code
(sanestring-dob s) Returns true if the string is a valid date in the format YYYY-MM-DD
(sanestring-email s) Returns true if the string is a valid email
(sanestring-height-cm s) Returns true if the string is a valid height in cm (integer between "30"-"229")
(sanestring-hh s) Returns true if the string is a two digit integer between "00"-"23"
(sanestring-hh:mm s) Returns true if the string is a valid time of day
(sanestring-hours s) Returns true if the string is an integer between "0"-"23"
(sanestring-ipaddr s) Returns true if the string is a valid IP address
(sanestring-mm s) Returns true if the string is a two digit integer between "00"-"59"
(sanestring-naphone s) Returns true if the string is a valid North American phone number
(sanestring-nonempty s) Returns true if the string is not empty
(sanestring-num s) Returns true if the string contains only the digits 0-9
(sanestring-small-hours-decimal s) Returns true if the strings is a float between "0.0"-"19.9"
(sanestring-weight-kg s) Returns true if the string is a valid weight in kg (float between "2.0"-"199.9")

Clone this wiki locally