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

前端 未结 11 2072
一向
一向 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:39

    string s = "THIS IS MY TEXT RIGHT NOW";
    
    s = System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(s.ToLower());
    

提交回复
热议问题