Capitalizing an entire string.
#2

loop + to upper
say if u have a string names string
then to capitalize it try this ->
pawn Код:
new newstring[256];//or any size larger may be?
for( new i, c = strlen(string); i < c; i++ )
{
    format(newstring,sizeof(newstring),"%s%c",newstring,toupper(string[i]));
}
//use newstring now it must be capitalized ..!
Reply


Messages In This Thread
Capitalizing an entire string. - by Dennis_Smith - 17.11.2012, 17:16
Re: Capitalizing an entire string. - by Niko_boy - 17.11.2012, 17:34
Re: Capitalizing an entire string. - by Stylock - 17.11.2012, 17:39

Forum Jump:


Users browsing this thread: 2 Guest(s)