Home  |  Delphi .net Home  |  System.String  |  ToUpper Method
ToUpper  
Method  
Converts a string to upper case
String Class
System NameSpace
CF1.  Function ToUpper ( ) : String ;
CF2.  Function ToUpper ( Culture : CultureInfo; ) : String;
CF : Methods with this mark are Compact Framework Compatible
Description
Converts all characters in the current string to upper case, taking into account culture information as appropriate.
Notes
Like a lot of string methods, the string object itself is not affected - the modified string is returned for assignment.
Microsoft MSDN Links
System
System.String
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

var
  strA, strB : String;

begin
  strA := 'Hello cruel World';

  Console.WriteLine('strA = ' + strA);

  strB := strA.ToUpper;

  Console.WriteLine('Converting to lower case');
  Console.WriteLine('strB = ' + strB);

  Console.ReadLine;
end.
Show full unit code
  strA = Hello cruel World
  Converting to upper case
  strB = HELLO CRUEL WORLD
 
 
Delphi Programming © Neil Moffatt All rights reserved.  |  Contact the author