代码:
Public Shared Function FirstSpell(strText As String) As String
Dim py1 = Function(cnChar As String) As String '一个汉字的拼音首
Dim arrCN As Byte() = Encoding.[Default].GetBytes(cnChar)
If arrCN.Length < 2 Then Return cnChar '非汉字,直接返回
Dim area As Integer = CInt