Created
May 20, 2021 04:05
-
-
Save glendmaatita/54998aaa24c22f8453c9f6e653d151f4 to your computer and use it in GitHub Desktop.
Dart Upper Case Words (ucwords)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var words = "hey i am here. HOW ARE YOU?"; | |
var ucwords = words.toLowerCase() | |
.split(" ") | |
.map((e) => "${e[0].toUpperCase()}${e.substring(1)}") | |
.join(" "); | |
print(ucwords); // "Hey I Am Here. How Are You?" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Excellent! Thanks!!!