mirror of
https://github.com/status-im/QR-Code-generator.git
synced 2026-08-31 01:31:10 +00:00
Updated and synchronized documentation comments for QrSegment's constants/functions involving character sets, in all languages.
This commit is contained in:
+8
-2
@@ -733,10 +733,16 @@ class QrSegment(object):
|
||||
|
||||
# ---- Constants ----
|
||||
|
||||
# (Public) Can test whether a string is encodable in numeric mode (such as by using make_numeric())
|
||||
# (Public) Describes precisely all strings that are encodable in numeric mode.
|
||||
# To test whether a string s is encodable: ok = NUMERIC_REGEX.fullmatch(s) is not None
|
||||
# A string is encodable iff each character is in the range 0 to 9.
|
||||
NUMERIC_REGEX = re.compile(r"[0-9]*\Z")
|
||||
|
||||
# (Public) Can test whether a string is encodable in alphanumeric mode (such as by using make_alphanumeric())
|
||||
# (Public) Describes precisely all strings that are encodable in alphanumeric mode.
|
||||
# To test whether a string s is encodable: ok = ALPHANUMERIC_REGEX.fullmatch(s) is not None
|
||||
# A string is encodable iff each character is in the following set: 0 to 9, A to Z
|
||||
# (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.
|
||||
|
||||
ALPHANUMERIC_REGEX = re.compile(r"[A-Z0-9 $%*+./:-]*\Z")
|
||||
|
||||
# (Private) Dictionary of "0"->0, "A"->10, "$"->37, etc.
|
||||
|
||||
Reference in New Issue
Block a user