extCAPWORDS function
dynamic
extCAPWORDS(
- dynamic value
CAPWORDS(str): capitalizes the first letter of each word
Implementation
dynamic extCAPWORDS(dynamic value) {
final s = varToStr(value);
return s
.split(" ")
.map((w) =>
w.isEmpty ? '' : w[0].toUpperCase() + w.substring(1).toLowerCase())
.join(" ");
}