02.05.2013, 09:40
Hello,
I look for a function to put a string in capital letter.
Do you know it?
I look for a function to put a string in capital letter.
Do you know it?
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;
}
For(new i = 0; i < strlen(text); ++i)
toupper(text[i]);