|
This function replicates the functionality of its C-library equivalent ispunct. See ispunct for more info.
Parameters
- c
- Character to be checked.
- loc
- Locale to be used. Shall have facet ctype present.
Template parameter charT is the character type.
Return Value
true if indeed c is a punctuation character, false otherwise.Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Output:
Sentence contains 2 punctuation characters. |
See also
| ctype | Character type facet (class template) |
| ispunct (cctype) | Check if character is a punctuation character (function) |
| iscntrl | Check if character is a control character using locale (function template) |
