0

我在vb2005中使用了richtextbox,我已经从数据库中读取了Unicode数据。

它显示不正确,因为它在 Unicode 字符中空格。

为什么 Richtextbox 在 Unicode 字符中包含空格?

在richtextbox中显示Unicode时如何删除Unicode中的空格有什么想法吗?

编码:

If dt.Rows.Count > 0 Then
        RichTextBox1.Rtf = dt.Rows(0)(0).ToString
End If
4

1 回答 1

0

您可以使用简单的替换命令。

Dim StringWithoutSpaces As String
StringWithoutSpaces = dt.Rows(0)(0).ToString.Replace(" ","")
于 2013-07-21T17:01:53.537 回答