SA-MP Forums Archive
Get part of 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: Get part of string. (/showthread.php?tid=546769)



Get part of string. - xHanks - 17.11.2014

For example, i got "Landstalker 15000" and want to extract only 15000 from this string.


Re: Get part of string. - CutX - 17.11.2014

Quote:
Originally Posted by xHanks
Посмотреть сообщение
For example, i got "Landstalker 15000" and want to extract only 15000 from this string.
pawn Код:
new str[] = "Landstalker 15000";
    strdel(str,0,12);
    printf("%s",str);

deleting from 0 to 12
resulting in str being: "15000"

you need to know (or "detect") where your number starts