Hello
in
StrVar:
“apple
orange
pear
…
…
water melon
kiwi”
I want to get water melon. (last second line)
How can I do it?
Hello
in
StrVar:
“apple
orange
pear
…
…
water melon
kiwi”
I want to get water melon. (last second line)
How can I do it?
try this
requiredstring = str.Split({Environment.NewLine},StringSplitOptions.RemoveEmptyEntries)(str.Split({Environment.NewLine},StringSplitOptions.RemoveEmptyEntries).Count-2)
cheers
Try this:
StrVar = StrVar.Split(Environment.NewLine)(StrVar.Split(Environment.NewLine).Count - 2)
Input1.Split(Environment.NewLine.ToCharArray, StringSplitOptions.RemoveEmptyEntries).Reverse.Skip(1).FirstOrDefault()
Hi @Golf_Aquascape,
yourStr.Split(Environment.NewLine.ToArray)(yourStr.Split(Environment.NewLine.ToArray).Count-2)
Hope it helps!
Thanks!
Hi @Golf_Aquascape Once try this
strResult = StrVar.Split(Environment.NewLine.ToArray,StringSplitOptions.RemoveEmptyEntries)(StrVar.Split(Environment.NewLine.ToArray,StringSplitOptions.RemoveEmptyEntries).Length - 2)