Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2638

Need help spliting a string into 2 lines

$
0
0

Hi

 

I have a string that I want to split into 2 lines if it has a '-' as a delimiter and remain 1 line if it doesnt.

I have tried the following, however if the string doesnt have a dash delimiter then it repeats line 1 rather than be blank.

 

stringvar array a; 
a := split({Vx_Command.ORG_CABIN_CAT_DESCR},chr(45)); 
a[1] + "- " + chr(10) + a[ubound(a)];

 

Can anyone help ?


Viewing all articles
Browse latest Browse all 2638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>