isUnicodePunctuation function

bool isUnicodePunctuation(
  1. int codePoint
)

Unicode punctuation in CommonMark's sense: the P and S categories.

Implementation

bool isUnicodePunctuation(int codePoint) {
  if (codePoint < 0) {
    return false;
  }
  if (codePoint < 0x80) {
    return isAsciiPunctuation(codePoint);
  }
  return _unicodePunctuation.hasMatch(String.fromCharCode(codePoint));
}