📜  颤振大写首字母文本字段 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:22.961000             🧑  作者: Mango

代码示例3
extension CapExtension on String {
  String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}';
  String get allInCaps => this.toUpperCase();
  String get capitalizeFirstofEach => this.split(" ").map((str) => str.capitalize).join(" ");
}