Upper first letter of a text input
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
João Carvalho
am 6 Dez. 2017
Beantwortet: Stephen23
am 6 Dez. 2017
Hello, I have a text input and I would like to save that text input with the first letter in uppercase and cut more than 30 letters, if necessary. What should I do? I have this:

0 Kommentare
Akzeptierte Antwort
Image Analyst
am 6 Dez. 2017
Try this:
lastIndex = min(30, length(new_user.name))
% Capitalize first character and lower case remaining characters.
new_user.name = [upper(new_user.name(1)), lower(new_user.name(2:lastIndex))];
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!