SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 21/10/2009, 09:42 PM   #21
Westie
Gangsta
 
Westie's Avatar
 
Join Date: Jul 2009
Posts: 859
Reputation: 63
Default Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09)

Updated! woo!
Westie is offline   Reply With Quote
Old 21/10/2009, 09:51 PM   #22
MenaceX^
High-roller
 
Join Date: Aug 2008
Posts: 3,769
Reputation: 13
Default Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09)

Quote:
Originally Posted by /^We(stie|z+[e|a
r)$/ ]
Updated! woo!
Good, waited for this.
MenaceX^ is offline   Reply With Quote
Old 21/12/2009, 11:34 AM   #23
Kyeno
Little Clucker
 
Join Date: Oct 2008
Posts: 37
Reputation: 0
Default Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09)

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 :]
__________________
Please have a laugh and visit creative fails repository at http://ifixed.it/
Kyeno is offline   Reply With Quote
Old 21/12/2009, 11:49 AM   #24
_Gangster_
Big Clucker
 
Join Date: Nov 2009
Posts: 77
Reputation: 0
Default Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09)

nice,Good job!

i will check it later..
_Gangster_ is offline   Reply With Quote
Old 22/12/2009, 09:54 AM   #25
GTA_Rules
Huge Clucker
 
Join Date: Aug 2008
Posts: 456
Reputation: 3
Default Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09)

Awesome include, nice work Westie
GTA_Rules is offline   Reply With Quote
Old 03/01/2010, 09:20 AM   #26
GreenHammy
Big Clucker
 
Join Date: Sep 2007
Posts: 147
Reputation: 0
Default Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09)

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?
GreenHammy is offline   Reply With Quote
Old 09/01/2010, 07:06 PM   #27
Puffmac
Huge Clucker
 
Join Date: Sep 2007
Posts: 398
Reputation: 0
Default Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09)

Westie, I love you.
Puffmac is offline   Reply With Quote
Old 09/02/2010, 12:23 AM   #28
mario713
Little Clucker
 
Join Date: Nov 2007
Posts: 4
Reputation: 0
Default Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09)

i have problem with explode(); can you help me pls? :P
i have that code:
Code:
new dane[256];
dane = "text|nextext";
new showdane[256];
explode(showdane, dane, "|"); //this is line where is error
and i got this error:

Code:
C:\Users\mario713\Desktop\samp03asvr_R4_win32\gamemodes\truckrp.pwn(292) : error 048: array dimensions do not match
mario713 is offline   Reply With Quote
Old 09/02/2010, 01:34 AM   #29
Calgon
Godfather
 
Calgon's Avatar
 
Join Date: Jan 2009
Posts: 6,471
Reputation: 1126
Default Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09)

Sorry if this sounds rude, but I made this a while ago and it works like the PHP substr_count() function:

pawn Code:
stock substr_count( substring[], string[] )
{
    new tmpcount;
  for( new i = 0; i < strlen( string ); i++)
  {
        if( strfind( string[ i ], substring, true ) )
        {
          tmpcount++;
        }
  }
  return tmpcount;
}
Calgon is offline   Reply With Quote
Old 09/02/2010, 03:33 PM   #30
Westie
Gangsta
 
Westie's Avatar
 
Join Date: Jul 2009
Posts: 859
Reputation: 63
Default Re: [INC] strlib v1.3 - Simple string modification (Update: 21/10/09)

Quote:
Originally Posted by mario713
i have problem with explode(); can you help me pls? :P
i have that code:
Code:
new dane[256];
dane = "text|nextext";
new showdane[256];
explode(showdane, dane, "|"); //this is line where is error
and i got this error:

Code:
C:\Users\mario713\Desktop\samp03asvr_R4_win32\gamemodes\truckrp.pwn(292) : error 048: array dimensions do not match
You need multidimentional arrays for showdane.

Code:
new dane[256];
dane = "text|nextext";
new showdane[10][256];
explode(showdane, dane, "|");
That's just an example. Next time, please read the docs.
Westie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Payday Modification SeQualX Help Archive 3 12/07/2010 03:31 PM
[FilterScript] [FS] Drift3r's Simple Vehicle Spawner *0.1b Update* ray8995 Filterscripts 20 15/05/2010 01:22 PM
[Modification] | SAMP Gui - Simple modification of samp Interface (InGame) LuxurioN™ Everything and Nothing 21 15/03/2010 01:55 PM
MOVED: SA-MP Server (EXE) modification - Do you like it? Woet Help Archive 0 02/11/2009 06:43 AM
GTA modification compatibility with SA-MP Lordician General 1 19/08/2009 07:03 PM


All times are GMT. The time now is 02:17 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.