Convert all first letter to upper case, rest lower for each word

前端 未结 11 2110
一向
一向 2020-12-04 10:15

I have a string of text (about 5-6 words mostly) that I need to convert.

Currently the text looks like:

THIS IS MY TEXT RIGHT NOW

I

11条回答
  •  日久生厌
    2020-12-04 10:25

    In addition to first answer, remember to change string selectionstart index to the end of the word or you will get reverse order of letters in the string.

    s.SelectionStart=s.Length;
    

提交回复
热议问题