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 ?

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

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

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

1 Like

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

3 Likes

It works! thanks!!

2 Likes

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