Query: ctype_punct
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
CTYPE_PUNCT(3) 1 CTYPE_PUNCT(3) ctype_punct - Check for any printable character which is not whitespace or an alphanumeric characterSYNOPSISbool ctype_punct (string $text)DESCRIPTIONChecks if all of the characters in the provided string, $text, are punctuation character.PARAMETERSo $text - The tested string.RETURN VALUESReturns TRUE if every character in $text is printable, but neither letter, digit or blank, FALSE otherwise.EXAMPLESExample #1 A ctype_punct(3) example <?php $strings = array('ABasdk!@!$#', '!@ # $', '*&$()'); foreach ($strings as $testcase) { if (ctype_punct($testcase)) { echo "The string $testcase consists of all punctuation. "; } else { echo "The string $testcase does not consist of all punctuation. "; } } ?> The above example will output: The string ABasdk!@!$# does not consist of all punctuation. The string !@ # $ does not consist of all punctuation. The string *&$() consists of all punctuation.NOTESNote If an integer between -128 and 255 inclusive is provided, it is interpreted as the ASCII value of a single character (negative val- ues have 256 added in order to allow characters in the Extended ASCII range). Any other integer is interpreted as a string contain- ing the decimal digits of the integer.SEE ALSOctype_cntrl(3), ctype_graph(3). PHP Documentation Group CTYPE_PUNCT(3)
| Related Man Pages |
|---|
| isalnum(3c) - hpux |
| ctype_alpha(3) - php |
| ctype_alnum(3) - php |
| ctype_lower(3) - php |
| ctype_print(3) - php |
| Similar Topics in the Unix Linux Community |
|---|
| if txtfile has any letters, echo something! |
| Names/nicknames for certain punctuation |
| get rid of non-alphanumeric characters |
| sed and punctuations |
| Replacing punctuation marks with the help of sed |