Thanks to visit codestin.com
Credit goes to rednoise.org

Reference

Class

RiTa

Name

isPunct

Description Returns true if every character of 'text' is a punctuation character.
Example
isPunct("?"); // returns -> true
Parameters
String or chartext input
Returns
booleantrue or false
Syntax
RiTa.isPunct(text);
Platform Java / JavaScript