arunkw
23rd August 2002, 14:13
Hi,
given below code takes seperates out input.string into temp.string and next.string as soon as it find as seperator sign "<" this code works fine
if pos(input.string,"<") <> 0 then
string.scan(input.string,"%s<%s",temp.string,next.string)
endif
but how do i seperate out a string which has escape sequence "\n" in it i.e abc\ndef\n
the above given code dosen't work for this
ie when i do
if pos(input.string,"\n") <> 0 then
string.scan(input.string,"%s\n%s",temp.string,next.string)
endif
this dosen't go inside if statements .....can somebody suggest me how to acheive this feat
given below code takes seperates out input.string into temp.string and next.string as soon as it find as seperator sign "<" this code works fine
if pos(input.string,"<") <> 0 then
string.scan(input.string,"%s<%s",temp.string,next.string)
endif
but how do i seperate out a string which has escape sequence "\n" in it i.e abc\ndef\n
the above given code dosen't work for this
ie when i do
if pos(input.string,"\n") <> 0 then
string.scan(input.string,"%s\n%s",temp.string,next.string)
endif
this dosen't go inside if statements .....can somebody suggest me how to acheive this feat