LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible using SCAN funciton to preform this string.

I have this string  LocalLogPath,"c:\log"
 
i want separate this one to two buff like this . buff1="LocalLogpath"; buff2 = "c:\log".
i use below function.
Scan (tempBuff1, "%s>%s[xt44]%s", tempBuff2,tempBuff3); 
 
then i got tempbuff2="LocalLogpath" , tempBuff3 = ","c:\log""  however , the red parts on tempBuff3 is not really i want.  
So i want to know is it possible to have my expected result with scan funciton only. or i should write extra function to preform this?
 
Thanks
Gerry
0 Kudos
Message 1 of 3
(3,047 Views)

To correctly separate this string you could use a slightly more complicated format string applying the "terminate on" modifier more than once:

Scan (tempBuff1, "%s[xt44]%s[dxt34]%s[xt34]", tempBuff2, tempBuff3);

Message Edited by Roberto Bozzolo on 12-25-2006 10:47 PM



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(3,040 Views)
Thanks a lot! I have solved this problem with you suggestion !  ^_^
0 Kudos
Message 3 of 3
(3,035 Views)