Remove space - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Remove space (
/showthread.php?tid=109260)
Remove space -
Marshew_DD - 18.11.2009
I'm trying to recognize and remove name spaces in file. My problem is I do not know how I can recognize and remove.
Код:
The file with nicknames:
Marshew.pl
Dice.pl
******.pl
kye.pl
if you see Marshew to Diceee there is a space of one line to another, similar like
"\r\n" in pawn.
I need recognize only nickname. Thanks
Re: Remove space -
Marshew_DD - 18.11.2009
up
Re: Remove space -
Ritchie999 - 18.11.2009
look at the picture in my signature, this should help one of your probelms..
Please.. have patience and someone is bound to reply to your post
You cant expect everyone to be on here 24/7 just answering topics non-stop
Re: Remove space -
snoob - 19.11.2009
hi
Код:
forward remnl(str[]);
public remnl(str[])
{
// remove cariage return and new line at the end of a string (2 last char \r\n)
new len = strlen(str);
strdel(str, len - 2, len);
return 1;
}
use it like
Код:
...
fread(file,string);
remnl(string);
// ready to be used.
...