I have to separate out each line of address to different indexes of an array.
Eg: 123/68A
KK Street
Karnataka
This address should be split with respect to each line and save to an array.
I have to separate out each line of address to different indexes of an array.
Eg: 123/68A
KK Street
Karnataka
This address should be split with respect to each line and save to an array.
@certified
Try this into an ‘Assign’: arrayVar = yourText.Split(Environment.NewLine.ToArray)
An extra empty line is generated between two lines.
Below is the array created. Why is this getting created like this.
[1]:
[2]: KK Street
[3]:
[4]: Karnataka
Try: yourText.Split(Environment.NewLine.ToArray, StringSplitOptions.RemoveEmptyEntries). Hope it works!
This worked. Thanks