Raised This Month: $ Target: $400
 0% 

String uppercase


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bcKq
Member
Join Date: Dec 2012
Location: Tczew, Poland
Old 03-07-2013 , 10:50   String uppercase
Reply With Quote #1

Hello, how can I make a string uppercase?

PHP Code:
new szDesc[64];
new 
weapons[64];
format(weapons63"testing");
format(szDesccharsmax(szDesc), "%s"weapons);
// format(szDesc, charsmax(szDesc), "%s", strtoupper(weapons)); - doesn't work 
Weapons string is retrieved from another function and it's lower case. I want to make all characters in 'weapons' variable uppercase.
Function strtoupper doesn't work, it needs something like this - strtoupper("here");
but I need that: strtoupper(weapons); but it simply doesn't work, I get weird string then, like some sound.wav.

I need a function to make a variable uppercase.

Last edited by bcKq; 03-07-2013 at 10:50.
bcKq is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 03-07-2013 , 11:28   Re: String uppercase
Reply With Quote #2

PHP Code:
format(weapons63"testing");
strtoupper(weapons);
// weapons now equals "TESTING" 
__________________
hleV is offline
bcKq
Member
Join Date: Dec 2012
Location: Tczew, Poland
Old 03-07-2013 , 11:35   Re: String uppercase
Reply With Quote #3

I'm stupid, thanks
bcKq 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 21:39.


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