Capital letter.
#1

Hello,

I look for a function to put a string in capital letter.

Do you know it?
Reply
#2

what u mean share code here to help you
Reply
#3

ummmm....

"~w~ Come fly with me"? < Lols funniest question ive heard
Reply
#4

I do not understand much English. ****** helps me

For example, set Name(playerid) capitalized.

CapitalLetter(Name(playerid));
Reply
#5

Still dont understand you
Reply
#6

I wanted know if it exist a function for put a chain in capital letter or if i have to make my own function
I speak little english, look:

new string[50];
new playername[50];
GetPlayerName(playerid, playername, sizeof(playername)); // Noliax8
string = Function...?(playername); // NOLIAX8

I have not code for the moment
Reply
#7

Here you are

Код:
CapitalLetter(Text[])
{
	for(new i = 0; i < strlen(Text); i++)
	{
		if(Text[i] >= 'a' && Text[i] <= 'z')
		{
		    Text[i] -= 'a' - 'A';
		}
		else
		{
			switch (Text[i])
			{
				case 'а', 'в' :
				{
					Text[i] = 'A';
				}
				case 'й', 'и', 'к':
				{
					Text[i] = 'E';
				}
				case 'о' :
				{
					Text[i] = 'I';
				}
				case 'ф' :
				{
					Text[i] = 'O';
				}
				case 'щ', 'ы' :
				{
					Text[i] = 'U';
				}
				case 'з' :
				{
					Text[i] = 'C';
				}
			}
		}
	}
        return Text;
}
Max
Reply
#8

Merci Maxence je vais essayer, mais je n'est mкme pas besoin du else, vu que c'est un pseudo d'utilisateur, il n'y a pas d'accent.
Reply
#9

toupper
Reply
#10

pawn Код:
For(new i = 0; i < strlen(text); ++i)
    toupper(text[i]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)