我正在使用此功能来反转文本,但速度有点问题。为了测试,我有 130,000 个字符的文本,大约需要 10 秒。有可能加快速度吗?这个问题与 C# 不同,因为它是一个 vb.net
Function ReverseString(ByRef strString As String) As String
Dim NextChr, TempString As String, StringLength, Count As Integer, NewString As String = Nothing
TempString = strString
StringLength = Len(TempString)
Do While Count <= StringLength
Count = Count + 1
NextChr = Mid(TempString, Count, 1)
NewString = NextChr & NewString
Loop
ReverseString = NewString
End Function