Isalphanum

From Pinguino
Jump to: navigation, search

Name

isAlphaNumeric

Description

Determine if the character x is alphabetic or numeric. Is equivalent to write:

value = isDigit( x ) || isAlpha( x );

Syntax

value = isAlphaNumeric( x );

Example

void setup()
{
    Serial.begin(9600);
}

void loop()
{
    if(Serial.available() > 0)
    {
        char c = Serial.read();
        Serial.printf("Is digit? %d\r\n",isDigit(c));
        Serial.printf("Is alpha? %d\r\n",isAlpha(c));
        Serial.printf("Is alphanum? %d\r\n",isAlphaNumeric(c));
        Serial.printf("Is cntrl? %d\r\n",isControl(c));
        Serial.printf("Is graph? %d\r\n",isGraph(c));
        Serial.printf("Is lower? %d\r\n",isLowerCase(c));
        Serial.printf("Is upper? %d\r\n",isUpperCase(c));
        Serial.printf("Is punct? %d\r\n",isPunct(c));
        Serial.printf("Is print? %d\r\n",isPrintable(c));
        Serial.printf("Is xdigit? %d\r\n",isHexadecimalDigit(c));
        Serial.printf("Is blank? %d\r\n",isWhitespace(c));
        Serial.printf("Is ascii? %d\r\n",isAscii(c));
        Serial.flush();
    }
}

Bugs

See also

isDigit isAlpha

Comments