Categories
How to make the first character of a string be capitalized?
Let's say the user enters his name with a small letter, how to implement it to display his name with a capital letter?
Answer the question
In order to leave comments, you need to log in
string.substring(0, 1).toUpperCase() + string.substring(1);
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question