[Info-vax] String Manipulation
HCorte
hmmbcorte at gmail.com
Wed Oct 13 06:54:56 EDT 2021
Have a string named MILLCON that contain "," as delimiter to split in two substrings have two aproches:
1º using routine ELEMENT from STR$
STR$ELEMENT(MESSCON,0,",",MILLCON)
STR$ELEMENT(IP_ADDRESS,1,",",MILLCON)
2º using routine INDEX and LEN from LIB$
POS_AUX = LIB$INDEX(MILLCON,",")
MESSCON = MILLCON(1:POS_AUX-1)
IP_ADDRESS = MILLCON(POS_AUX+1:LIB$LEN(MILLCON)-(POS_AUX+1))
is either aproach good or is there one bether and if so why?
More information about the Info-vax
mailing list