DelphiBasics
UpCase
Function
Convert a Char value to upper case System unit
 function UpCase ( Letter : Char ) : Char;
Description
The UpCase function converts a single Letter character to upper case.
 
It only works on the standard 'a'..'z' letters.
 
It returns Letter unchanged if already upper case or non alphabetic.
Notes
Warning : this command is restricted to single characters, and does not handle International characters. Better to use AnsiupperCase instead.
Related commands
AnsiLowerCase Change upper case characters in a string to lower case
AnsiUpperCase Change lower case characters in a string to upper case
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 Download this web site as a Windows program.




 
Example code : Convert g to G
var
  lower, upper : char;

begin
  // Convert a lower case letter to upper case
  lower := 'g';
  upper := UpCase(lower);

  // Display these letters
  ShowMessage('lower = '+lower+' upper = '+upper);
end;
Show full unit code
   lower = g upper = G
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Home Page