AdaPower Logged in as Guest
Ada Tools and Resources

Ada 95 Reference Manual
Ada Source Code Treasury
Bindings and Packages
Ada FAQ


Join >
Articles >
Ada FAQ >
Getting Started >
Home >
Books & Tutorials >
Source Treasury >
Packages for Reuse >
Latest Additions >
Ada Projects >
Press Releases >
Ada Audio / Video >
Home Pages >
Links >
Contact >
About >
Login >
Back
Changing Strings to Upper or Lower Case (David Botton)

with Ada.Strings.Maps.Constants;
with Ada.Strings.Fixed;
with Ada.Text_IO; use Ada.Text_IO;

procedure Test is
   Test_String : String := "Hello World!";
begin
   -- Display Original String
   Put_Line(Test_String);

   -- Change String to all Upper Case and Display
   Put_Line(Ada.Strings.Fixed.Translate(Test_String,
     Ada.Strings.Maps.Constants.Upper_Case_Map));

   -- Change String to all Lower Case and Display
   Put_Line(Ada.Strings.Fixed.Translate(Test_String,
     Ada.Strings.Maps.Constants.Lower_Case_Map));

end Test;


(c) 1998-2004 All Rights Reserved David Botton