sscanf2 Explode String - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: sscanf2 Explode String (
/showthread.php?tid=537891)
sscanf2 Explode String -
maxisaibot - 18.09.2014
Hi.
How can i explode my string with sscanf2 ? Any example?
I have this string: "AAAA - BBBB - CCC DDDD" . I want explode "-" this key
So i must get "AAAA" , "BBBB", "CCC DDDD"
Sorry for english. Please help
Re: sscanf2 Explode String -
[XST]O_x - 18.09.2014
https://github.com/Y-Less/sscanf/wik...ced-Delimiters
Re: sscanf2 Explode String -
DRIFT_HUNTER - 18.09.2014
Код:
sscanf(InputString, "p<->s[size]s[size]", output1, output2);
p<> (it defines delimiter character, you can set it to , . - | or whatever you like...
Re: sscanf2 Explode String -
maxisaibot - 18.09.2014
Thanks a lot, but when i use the sscanf, strings remove spaces.
Example AAA-BBB- CCC
not get " CCC". sscanf gives "CCC" for last one. Why remove spaces?