--    Original Booch Components (Ada 95 elaboration version)
-- Copyright (C) 2000 Grady Booch, provided WITHOUT ANY WARRANTY.
-- Further license details should appear at the end of this file.

package Booch.Character_Utilities is
pragma Pure;

    subtype Control_Character   is Character range Ascii.Nul .. Ascii.Us;
    subtype Graphic_Character   is Character range ' ' .. '~';
    subtype Uppercase_Character is Character range 'A' .. 'Z';
    subtype Lowercase_Character is Character range 'a' .. 'z';
    subtype Digit_Character     is Character range '0' .. '9';
    subtype Digit               is Integer   range  0  .. 15 ;
    subtype Letter              is Integer   range  1  .. 26 ;

    procedure Make_Uppercase (The_Character : in out Character);
    procedure Make_Lowercase (The_Character : in out Character);

    function Uppercase       (The_Character : in Character) return Character;
    function Lowercase       (The_Character : in Character) return Character;

    function Is_Control      (The_Character : in Character) return Boolean;
    function Is_Graphic      (The_Character : in Character) return Boolean;
    function Is_Uppercase    (The_Character : in Character) return Boolean;
    function Is_Lowercase    (The_Character : in Character) return Boolean;
    function Is_Digit        (The_Character : in Character) return Boolean;
    function Is_Alphabetic   (The_Character : in Character) return Boolean;
    function Is_Alphanumeric (The_Character : in Character) return Boolean;
    function Is_Special      (The_Character : in Character) return Boolean;

    function Value_Of        (The_Character : in Character) return Digit;
    function Image_Of        (The_Digit     : in Digit)     return Character;
    function Index_Of        (The_Character : in Character) return Letter;
    function Uppercase_Of    (The_Letter    : in Letter)    return Character;
    function Lowercase_Of    (The_Letter    : in Letter)    return Character;

    function Is_Equal        (Left           : in Character; 
                              Right          : in Character; 
                              Case_Sensitive : in Boolean := True) 
                              return              Boolean;
    function Is_Less_Than    (Left           : in Character; 
                              Right          : in Character; 
                              Case_Sensitive : in Boolean := True) 
                              return              Boolean;
    function Is_Greater_Than (Left           : in Character; 
                              Right          : in Character; 
                              Case_Sensitive : in Boolean := True) 
                              return              Boolean;

    Lexical_Error : exception;

end Booch.Character_Utilities;

--        Original Booch Components (Ada 95 elaboration version)
--                               
-- Copyright (C) 2000 Grady Booch
--
-- This is free software; you can redistribute it and/or modify it under
-- terms of the GNU General Public License as published by the Free Software
-- Foundation; either version 2, or (at your option) any later version.
-- This software is distributed in the hope that it will be useful, but 
-- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-- for more details. Free Software Foundation, 59 Temple Place - Suite
-- 330, Boston, MA 02111-1307, USA.
--
-- As a special exception, if other files instantiate generics from this
-- unit, or you link this unit with other files to produce an executable,
-- this unit does not by itself cause the resulting executable to be
-- covered by the GNU General Public License. This exception does not
-- however invalidate any other reasons why the executable file might be
-- covered by the GNU General Public License.  
--
-- The book _SOFTWARE_COMPONENTS_WITH_Ada__Structures,_Tools,_and_Subsystems_
-- ISBN 0-8053-0609-9 by Grady Booch, fully describes the design and usage 
-- of this software.
--
-- The Ada 83 version of the components is the exact version described in
-- the book mentioned above.  The Ada 95 elaboration version differs only in
-- that each component unit is a child of a root package named "Booch" and
-- each package declaration includes the most appropriate elaboration control
-- pragma.  In addition, the Ada 95 child iteration version eliminates the
-- distinct iterator and noniterator forms for components that had them and
-- instead makes the associated "Iterate" procedures available as children of
-- those components.  More enhanced versions may be produced in the future.
--
-- The Original Booch Components are actively maintained and enhanced
-- by Vincent Marciante and Samuel T. Harris and may be found at the 
-- AdaPower web site (http://www.adapower.com) provided by David Botton.
