gpt4 book ai didi

vb.net - 在字符串中查找 & vbCrLf & - vb.net

转载 作者:行者123 更新时间:2023-12-04 11:56:17 24 4
gpt4 key购买 nike

在一个字符串中,我有类似“First & vbCrLf & Name”的东西 - 但是,我想去掉 & vbCrLf & 所以它不会导致换行。

我做过类似的事情

If theString.Contains("& vbCrLf &") Then
' and replace, could do this above of course, but I just want it to go into the IF
End If


If theString.Contains("\n") Then
' and replace, could do this above of course, but I just want it to go into the IF
End If

甚至 "\r\n"但无济于事。

我错过了什么?

最佳答案

If theString.Contains(vbCrLf) Then
'Do something
End If

或者...
theString = theString.Replace(vbCrLf, "")

关于vb.net - 在字符串中查找 & vbCrLf & - vb.net,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31054097/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com