StringToUpper

Transforme tous les symboles de la chaîne indiquée aux symboles majuscules  selon la place.

bool  StringToUpper(
   string&  string_var      // chaîne à traiter
   );

Paramètres

string_var

[in][out] La chaîne.

La valeur rendue

En cas de l'exécution fructueuse rend true, autrement false.Pour la réception du code de l'erreur il faut appeler la fonction GetLastError().

Example:

void OnStart()
  {
//--- define the source string in lowercase
   string text=" - this string, written in lowercase, must be written in uppercase";
//--- Display the source string in the log
   Print("Source line:\n"text);
//--- convert all string characters to uppercase and display the result in the log
   if(StringToUpper(text))
      Print("The original string after using the StringToUpper() function:\n"text);
      
   /*
   Result
   Source line:
    - this string, written in lowercasemust be written in uppercase
   The original string after using the StringToUpper() function:
    - THIS STRING, WRITTEN IN LOWERCASEMUST BE WRITTEN IN UPPERCASE
   */
  }

Voir aussi

StringToLower, StringTrimLeft, StringTrimRight