toPascalCase property

String get toPascalCase

将字符串转换为帕斯卡命名(首字母大写)

Implementation

String get toPascalCase {
  if (isEmpty) return '';
  return split(RegExp(r'[_\s-]+')).map((word) => word.capitalize).join();
}