Dart String Like Camelcase

[Solved] Dart String Like Camelcase | Swift - Code Explorer | yomemimo.com
Question : dart string like camelcase

Answered by : francisco-de-nadai-netto

extension StringCasingExtension on String { String toCapitalized() => length > 0 ?'${this[0].toUpperCase()}${substring(1).toLowerCase()}':''; String toTitleCase() => replaceAll(RegExp(' +'), ' ').split(' ').map((str) => str.toCapitalized()).join(' ');
}

Source : https://stackoverflow.com/questions/29628989/how-to-capitalize-the-first-letter-of-a-string-in-dart | Last Update : Fri, 29 Jul 22

Answers related to dart string like camelcase

Code Explorer Popular Question For Swift