程序是照着delphi的源程序改的,请注意delphi的字符串数组是1-based的,而vb.net是0-based的。
感觉delphi在这一点在数组的base上有点不统一。
Public Shared Function QuotedStr(ByVal S As String) As String
Dim I As Integer
Dim Result As String = S
For I = Len(Result) - 1 To 0 Step -1
If Result.Chars(I) = "'" Then Result = Result.Insert(I, "'")
Next
Result = "'" + Result + "'"
Return Result
End Function
感觉delphi在这一点在数组的base上有点不统一。
Public Shared Function QuotedStr(ByVal S As String) As String
Dim I As Integer
Dim Result As String = S
For I = Len(Result) - 1 To 0 Step -1
If Result.Chars(I) = "'" Then Result = Result.Insert(I, "'")
Next
Result = "'" + Result + "'"
Return Result
End Function
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步