您好,我只是想知道是否有反转此代码以使第一个字母为小写而其余单词为大写?
Dim s As String = "the quick brown fox jumps over the lazy dog"
Dim s2 As String = StrConv(s, VbStrConv.ProperCase)
MessageBox.Show(s2)
我正在使用 .net 框架 3.5
这是答案!谢谢蒂姆!
Dim s As String = TextBox1.Text
Dim s2 = String.Join(" ", s.Split() .Select(Function(w)UppercaseAllButFirst(w)).ToArray())
TextBox2.Text = s2