.ToTitleCase not working on all upper case string

前端 未结 3 938
旧时难觅i
旧时难觅i 2021-02-19 02:26
Public Function TitleCase(ByVal strIn As String)
      Dim result As String = \"\"
      Dim culture As New CultureInfo(\"en\", False)
      Dim tInfo As TextInfo = cult         


        
3条回答
  •  旧时难觅i
    2021-02-19 03:14

    Regarding answer 1, it's a nice idea but the code does not compile; and, when corrected for syntax, it does not work. I didn't have time to debug it but you will need to if you want to use it. Part of the problem is the index assumes 1-based indexes but they are 0-based in C#. There are other issues, as well.

提交回复
热议问题