Example #1
0
void ChangeCase (int iCmd , CString &str)
{
 switch	(iCmd)
	{
		case ID_SENTENCECASE:
			SentenceCase (str);
			break;
			
		case ID_LOWERCASE:	
			str.MakeLower ();
			break;

		case ID_UPPERCASE:
			MakeUpper (str);
			break;

		case ID_TITLECASE:
			TitleCase (str);
			break;

		case ID_TOGGLECASE:
			ToggleCase (str);
			break;
	}
}
Example #2
0
 printf("Strtran:%s:\n",ptr);
 free(ptr);

 ptr=Strtran("HERVE","A","*","\0");
 printf("Strtran introuvable:%s:\n",ptr);
 free(ptr);

 ptr=Strtran("","E","*","\0");
 printf("Strtran:%s:\n",ptr);
 free(ptr);

 ptr=Strtran(" ","E","*","\0");
 printf("Strtran:%s:\n",ptr);
 free(ptr);

 ptr=ToggleCase("AAA aaa BBB bbb CCC ccc 1A2a3B4b","\0");
 printf("ToggleCase:%s:\n",ptr);
 free(ptr);
 
 ptr=ToggleCase(" ","\0");
 printf("ToggleCase:%s:\n",ptr);
 free(ptr);
 
 ptr=ToggleCase("","\0");
 printf("ToggleCase:%s:\n",ptr);
 free(ptr);

 ptr=At("LIGNE DE TEXTE","DE","\0");
 printf("At:%s:\n",ptr);
 free(ptr);