split strings

Henk

Member
Joined
Feb 12, 2006
Messages
7
Programming Experience
Beginner
Hi,

is there a way to split strings over multiple lines?

like this:

"lalalalallalalala
lalallalalalla
lalalalalla"
 
The purpose of the question is not clear. It cannot be determined if you are asking how to split a string that contains newline characters or whether you intend to split a string into several lines.

Please provide the BEFORE and AFTER strings you wish to achieve and I will tell you how to achieve it. It may be that the operation you require is not even a Split
 
im not sure what you are trying to do but you can make use of a SPLIT function... using string array... some previous post here have an example..
 
It's not possible per se. In VB the end of the line is the end of the line. You can use the line continuation characters which are a space followed by an underscore, but you cannot have that within a string. You will have to concatenate several strings, which you can do over several lines:
VB.NET:
 "lalalalallalalala" & _
"lalallalalalla" & _
"lalalalalla"
 
It depends on the usage (question is unclear), for instance here are two alternatives to split/replace spaces with newline characters and display in multiline textbox:
VB.NET:
TextBox1.Lines = "test test test".Split(" ")
'or
TextBox1.Text = "test test test".Replace(" ", vbNewLine)
For html you could insert BR tags instead of newline characters to display text over several lines, but this is guessing too much of what Henk asks for..
 
Back
Top