问题描述
我有一个看起来像这样的字符串 - sometext ;; sometext ;; sometext ;; sometext
我希望它显示在一个看起来像这样的页面上
sometext
sometext
sometext
sometext
$ b $我知道我需要一个循环和分裂,但我不知道如何让它工作,任何帮助都会很棒,谢谢
I have a string which looks like this - sometext;;sometext;;sometext;;sometext
i''d like to have it displaying on a page looking like this
sometext
sometext
sometext
sometext
i know i need a loop and a split, but i''m not sure how to get it working, any help would be great, thanks
推荐答案
你在哪里存储你的字符串" sometext; ; sometext ;; sometext ;; sometext?
可以说你的sometext ;; sometext ;; sometext ;; sometext是对象Text1。
然后我们可以编码为:
Text1.Text = Replace(Text1.Text," ;;;",vbNewLine)
注:
在设计时将Multiline设置为TRUE。
问候
Where did you store your String"sometext;;sometext;;sometext;;sometext"?
lets say that your "sometext;;sometext;;sometext;;sometext" is the object Text1.
then we can do coding as:
Text1.Text = Replace(Text1.Text, ";;", vbNewLine)
Note:
During Design time set Multiline to TRUE.
Regards
这篇关于从字符串&中删除项目添加新行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!