Raised This Month: $51 Target: $400
 12% 

[INC] Stringator


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SAMURAI16
BANNED
Join Date: Sep 2006
Old 09-12-2008 , 07:17   [INC] Stringator
Reply With Quote #1

Been bored i decide to post my .inc here

stocks:
PHP Code:
RemoveQuotes(String:str[]) 
NumToString(num,String:str[]) 
ExtractString(const String:source[], startendString:output[128])
StreQIndex(const String:str[], const String:str2[], pos
GetRandomPlayer()
SetChar(String:str[],len,char)
StrStrip(String:str[], iChars)
CustomGetPlayers(players[MAXPLAYERS],pnum,const String:flags[] = ""team = -1)
QuickContain(const String:str[], start 0)
StrCount(const String:str[], FindChar)
StrFindNum(const String:str[],FindChar,iNum)
StrnEqual(const String:str1[],const String:str2[],0)
StrRev(const String:input[], String:output[], maxchars)
bool:Strbrkqt(const String:text[], String:Left[], leftLenString:Right[], rightLen)
ReplaceAll(String:string[], lenString:what[],  String:with[]) 
Will be updated
Attached Files
File Type: inc stringator.inc (7.9 KB, 258 views)

Last edited by SAMURAI16; 10-19-2008 at 01:41.
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 09-12-2008 , 14:37   Re: [INC] Stringator
Reply With Quote #2

I didn't look over everything, but I did notice you made "NumToString". What's the difference between that and using IntToString or FloatToString?
bl4nk is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 09-12-2008 , 14:47   Re: [INC] Stringator
Reply With Quote #3

First part of .inc I made before to know the existence of IntToString()
It's almost the same thing; I can't say wich ones works faster
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 09-12-2008 , 15:55   Re: [INC] Stringator
Reply With Quote #4

I imagine IntToString is because it's a native function.
bl4nk is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 09-12-2008 , 16:03   Re: [INC] Stringator
Reply With Quote #5

you'll right

-updated with a new stock
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
SAMURAI16
BANNED
Join Date: Sep 2006
Old 10-18-2008 , 05:21   Re: [INC] Stringator
Reply With Quote #6

updated
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
BAILOPAN
Join Date: Jan 2004
Old 10-18-2008 , 22:49   Re: [INC] Stringator
Reply With Quote #7

You should const-qualifier strings that are inparams and not outparams

i.e. StrRev's "input" -- assuming it's not modified, should be const
__________________
egg
BAILOPAN is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 10-19-2008 , 01:42   Re: [INC] Stringator
Reply With Quote #8

I can say done
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
V0gelz
Senior Member
Join Date: Jun 2004
Old 02-01-2009 , 16:56   Re: [INC] Stringator
Reply With Quote #9

sweet stuff m8. thanks
__________________
V0gelz is offline
BAILOPAN
Join Date: Jan 2004
Old 02-03-2009 , 08:58   Re: [INC] Stringator
Reply With Quote #10

Another comment here: NumToString(num,String:str[]) has no length specifier, meaning it is not possible to bounds check. Using this could result in variable corruption.
__________________
egg
BAILOPAN is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 04:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode