diff --git a/c/qrcodegen.c b/c/qrcodegen.c index e98aadc..258b432 100644 --- a/c/qrcodegen.c +++ b/c/qrcodegen.c @@ -84,43 +84,6 @@ static const int PENALTY_N4 = 10; /*---- Function implementations ----*/ -// Public function - see documentation comment in header file. -bool qrcodegen_isAlphanumeric(const char *text) { - for (; *text != '\0'; text++) { - char c = *text; - if (('0' <= c && c <= '9') || ('A' <= c && c <= 'Z')) - continue; - else switch (c) { - case ' ': - case '$': - case '%': - case '*': - case '+': - case '-': - case '.': - case '/': - case ':': - continue; - default: - return false; - } - return false; - } - return true; -} - - -// Public function - see documentation comment in header file. -bool qrcodegen_isNumeric(const char *text) { - for (; *text != '\0'; text++) { - char c = *text; - if (c < '0' || c > '9') - return false; - } - return true; -} - - // Public function - see documentation comment in header file. int qrcodegen_encodeBinary(uint8_t dataAndTemp[], size_t dataLen, uint8_t qrcode[], enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask) { diff --git a/c/qrcodegen.h b/c/qrcodegen.h index 619336b..5615f5f 100644 --- a/c/qrcodegen.h +++ b/c/qrcodegen.h @@ -64,18 +64,6 @@ enum qrcodegen_Mask { #define qrcodegen_BUFFER_LEN_MAX qrcodegen_BUFFER_LEN_FOR_VERSION(40) -/* - * Tests whether the given string can be encoded in alphanumeric mode. - */ -bool qrcodegen_isAlphanumeric(const char *text); - - -/* - * Tests whether the given string can be encoded in numeric mode. - */ -bool qrcodegen_isNumeric(const char *text); - - /* * Encodes the given binary data to a QR Code symbol, return the actual version number used. * If the data is too long to fit in any version in the given range at the given ECC level,