Capitalize only the first letter of a character
Ältere Kommentare anzeigen
How to Capitalize only the first letter of a character ? upper function capitalize all the letters. I want only to make this change ONLY for the first letter.
Thank you in advance
Akzeptierte Antwort
Weitere Antworten (1)
str = "dogs are better than cats";
regexprep(str ,'(\<\w{1})', '${upper($1)}')
"Dogs Are Better Than Cats"
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!