Dim sts() As String = {"孙小子","张麻子","魏武大帝","秦光"}
For Each st As String In sts
Dim x1 As String = StrToTitleCase(GetPy(st.SubString(0,1)))
' Output.Show(x1)
Dim m1 As String = getpy(st.SubString(1))
Dim m3() As String
m3 = m1.split(" ")
For Index As Integer = 0 To m3.length -1
'Output.Show(m3(Index))
Next
Dim Str1 = String.Join("", m3)
Dim m5 As String = StrToTitleCase(Str1)
' Output.Show(m5)
Dim zh As String
zh = x1 & " " & m5
Output.Show(zh)
Next
以上代码输出结果为
Sun Xiaozi
Zhang Mazi
Wei Wudadi
Qin Guang
现在我有一列姓名的数据,希望在另一列,显示同样效果的汉语拼音,请大师赐教。