C# string format flag or modifier to lowercase param

前端 未结 2 774
情深已故
情深已故 2020-12-15 15:09

Is it possible to specify some kind of flag or modifier on a string format param to make it lower case or upper case?

Example of what I want:

String.         


        
2条回答
  •  猫巷女王i
    2020-12-15 16:10

    In short, no; AFAIK you'd have to fix the source values, or use your own replacement to string.Format. Note that if you are passing in a custom culture (to string.Format) you may want to use culture.TextInfo.ToLower(s), rather than just s.ToLower().

提交回复
热议问题