Capitaliser la première lettre d'une chaîne:
"is There any other WAY".capitalize
res8: String = Is There any other WAY
Capitaliser la première lettre de chaque mot dans une chaîne:
"is There any other WAY".split(' ').map(_.capitalize).mkString(" ")
res9: String = Is There Any Other WAY
Capitaliser la première lettre d'une chaîne, alors que tout inférieur boîtier autre:
"is There any other WAY".toLowerCase.capitalize
res7: String = Is there any other way
Capitaliser la première lettre de chaque mot dans une chaîne, alors que tout inférieur boîtier autre:
"is There any other WAY".toLowerCase.split(' ').map(_.capitalize).mkString(" ")
res6: String = Is There Any Other Way