This page is also available in 3 other languages

isPunct()

[Characters]

Description

Analyse if a char is punctuation (that is a comma, a semicolon, an exlamation mark and so on). Returns true if thisChar is punctuation.

Syntax

isPunct(thisChar)

Parameters

thisChar: variable. Allowed data types: char

Returns

true: if thisChar is a punctuation.

Example Code

if (isPunct(myChar)) {  // tests if myChar is a punctuation character
  Serial.println("The character is a punctuation");
}
else {
  Serial.println("The character is not a punctuation");
}

See also