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

[stocks] String stocks


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-05-2007 , 23:26   [stocks] String stocks
Reply With Quote #1

Here are some string stocks I found useful that I created in sourcepawn. It only works on string type variables

Code:
stock UTIL_StrToLower(String:Source[]) {     new len = strlen(Source);     for(new i = 0, b; i < len; i++)     {         b = Source[i];         if(b >= 65 && b <= 90)         {             Source[i] += (1<<5);         }     }     return 1; } stock UTIL_StrToUpper(String:Source[]) {     new len = strlen(Source);     for(new i = 0, b; i < len; i++)     {         b = Source[i];         if(b >= 97 && b <= 122)         {             Source[i] -= (1<<5);         }     }     return 1; } stock UTIL_IsSpace(ch) {     if(ch == 32)     {         return 1;     }     return 0; }
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
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

Forum Jump


All times are GMT -4. The time now is 06:51.


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