Returns true if the character is a punctuation mark.
bool isPunctuation(String char) { return RegExp(r'\p{P}', unicode: true).hasMatch(char); }