Go module that provides the same string constants available in the Python string module
The concatenation of the ASCIILowercase and ASCIIUppercase constants described below. This value is not locale-dependent.
The lowercase letters 'abcdefghijklmnopqrstuvwxyz'. This value is not locale-dependent and will not change.
The uppercase letters 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'. This value is not locale-dependent and will not change.
The string '0123456789'.
The string '0123456789abcdefABCDEF'.
The string '01234567'.
String of ASCII characters which are considered punctuation characters in the C locale:
!"#$%&'()*+,-./:;<=>?@[\]^`{|}~.
String of ASCII characters which are considered printable. This is a combination of Digits, ASCIILetters, Punctuation, and Whitespace.
A string containing all ASCII characters that are considered whitespace. This includes the characters space, tab, linefeed, return, formfeed, and vertical tab.
Standard go get:
$ go get github.com/sashsinha/strconstspackage main
import (
"fmt"
"github.com/sashsinha/strconsts"
)
func main() {
fmt.Println("ASCIILetters:", strconsts.ASCIILetters)
fmt.Println("ASCIILowercase:", strconsts.ASCIILowercase)
fmt.Println("ASCIIUppercase:", strconsts.ASCIIUppercase)
fmt.Println("Digits:", strconsts.Digits)
fmt.Println("HexDigits:", strconsts.HexDigits)
fmt.Println("OctDigits:", strconsts.OctDigits)
fmt.Println("Punctuation:", strconsts.Punctuation)
fmt.Println("Printable:", strconsts.Printable)
fmt.Println("Whitespace:", strconsts.Whitespace)
}Output:
ASCIILetters: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
ASCIILowercase: abcdefghijklmnopqrstuvwxyz
ASCIIUppercase: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Digits: 0123456789
HexDigits: 0123456789abcdefABCDEF
OctDigits: 01234567
Punctuation: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
Printable: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
Whitespace:
