How to capitalize first letter of string variable?

I have string variable, which different each time, but it always starts with small letter. Haw can i capitalize first letter ?

1 Like

Variable.substring(0,1).ToUpper+Variable.substring(1).toLower

1 Like

Thanks for the response! could you help me also, cause I might understand it incorrectly

@boadriqa
testcapit.Substring(0,1).ToUpper+testcapit.Substring(1).ToLower

5 Likes

What a stupid mistake I’ve made :person_facepalming: I definitely need some rest) Thanks a lot!

2 Likes

You will not need to do so much. Use Propercase and it should make your string into the required format.
See here:

8 Likes

It works! thanks!!

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.