Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
MenaceX^ - 21.10.2009
Quote:
Originally Posted by /^We(stie|z+[e|a
r)$/ ]
Updated! woo!
|
Good, waited for this.
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
Kyeno - 21.12.2009
Now this is insane. I was about to write a string handling library myself, but got stuck on the explode part.
Seif directed me here so thanks A LOT! Both Seif and Westie :]
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
_Gangster_ - 21.12.2009
nice,Good job!
i will check it later..
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
GTA_Rules - 22.12.2009
Awesome include, nice work Westie
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
GreenHammy - 03.01.2010
How does explode work? I want to delete something at the end of a string for example I want to delete the = symbol out of this sentence: pie=
but how would I do this?
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
Puffmac - 09.01.2010
Westie, I love you.
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
mario713 - 09.02.2010
i have problem with explode(); can you help me pls? :P
i have that code:
Код:
new dane[256];
dane = "text|nextext";
new showdane[256];
explode(showdane, dane, "|"); //this is line where is error
and i got this error:
Код:
C:\Users\mario713\Desktop\samp03asvr_R4_win32\gamemodes\truckrp.pwn(292) : error 048: array dimensions do not match
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
Calgon - 09.02.2010
Sorry if this sounds rude, but I made this a while ago and it works like the PHP substr_count() function:
pawn Код:
stock substr_count( substring[], string[] )
{
new tmpcount;
for( new i = 0; i < strlen( string ); i++)
{
if( strfind( string[ i ], substring, true ) )
{
tmpcount++;
}
}
return tmpcount;
}
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
Westie - 09.02.2010
Quote:
Originally Posted by mario713
i have problem with explode(); can you help me pls? :P
i have that code:
Код:
new dane[256];
dane = "text|nextext";
new showdane[256];
explode(showdane, dane, "|"); //this is line where is error
and i got this error:
Код:
C:\Users\mario713\Desktop\samp03asvr_R4_win32\gamemodes\truckrp.pwn(292) : error 048: array dimensions do not match
|
You need multidimentional arrays for showdane.
Код:
new dane[256];
dane = "text|nextext";
new showdane[10][256];
explode(showdane, dane, "|");
That's just an example. Next time, please read the docs.
AW: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
Meta - 16.11.2010
reupload?
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
Grim_ - 16.11.2010
From Westie's signature:
Quote:
What's that? You can't download my files? Well, my server had a heart attack and lost its entire hard drive contents. Well done server. Stop asking for downloads, I'll put them up whenever.
|
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
Luka P. - 16.11.2010
Really useful, thanks.
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
Donya - 06.04.2011
hey. i have a problem.. erm
with str_replace - why does it not convert more than 2 words in a string?
Example, i put "Hello Moto Moto" and put "World" as the replacing string.. so like it returned "Hello World Moto"
maybe its because of
pawn Код:
iItterations = (iLengthSource - iLengthTarget)
?
Edit: yep it was that, i put it to
pawn Код:
iItterations = (iLengthSource/* - iLengthTarget*/)
and it works fine, thanks for your functions Westie!
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
Minokon - 06.04.2011
very nice and useful include ;p Maybe I use it
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
Ironboy - 19.04.2011
http://files.typefish.co.uk/sa-mp/strlib.inc
is not working?
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
Westie - 19.06.2011
Quote:
Originally Posted by Donya
...
|
I thought I had fixed that? Oh well...
Brownie points to whomever posts the link and asks whether the server is down.
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
clavador - 20.03.2012
reupload!
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
ikkentim - 10.04.2012
Reupload for who needs it:
http://pastebin.com/GTaVZqfT
(Sorry if you call this bumping...)
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
QTSwift - 10.09.2013
Nice job Westie ^^
Really useful for /announce
Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09) -
Emre__ - 19.08.2014
This include is really awesome! That really made my day.