toPascalCase method
Converts the string to PascalCase.
Example:
'hello world'.toPascalCase(); // 'HelloWorld'
Implementation
String toPascalCase() => words()
.map((String word) =>
word[0].toUpperCase() + word.substring(1).toLowerCase())
.join();