--  Ada.Strings.Wide_Fixed, Wide_Bounded and Wide_Unbounded, and Ada.Wide_Characters.Handling:
--  the operations of the String forms, for Wide_String.
with Ada.Characters.Conversions;
with Ada.Strings; use Ada.Strings;
with Ada.Strings.Wide_Bounded;
with Ada.Strings.Wide_Fixed;
with Ada.Strings.Wide_Maps; use Ada.Strings.Wide_Maps;
with Ada.Strings.Wide_Unbounded; use Ada.Strings.Wide_Unbounded;
with Ada.Wide_Characters.Handling; use Ada.Wide_Characters.Handling;
with Ada.Wide_Text_IO; use Ada.Wide_Text_IO;

procedure Main is
   package W12 is new Ada.Strings.Wide_Bounded.Generic_Bounded_Length (12);
   S : constant Wide_String := "  ωμέγα αβ  ";
   T : Wide_String (1 .. 6);
   U : Unbounded_Wide_String := To_Unbounded_Wide_String ("γράμμα");
   B : W12.Bounded_Wide_String := W12.To_Bounded_Wide_String ("λόγος");

   function Img (N : Natural) return Wide_String is (Ada.Characters.Conversions.To_Wide_String (Natural'Image (N)));
   function Img (B : Boolean) return Wide_String is (Ada.Characters.Conversions.To_Wide_String (Boolean'Image (B)));
begin
   Put_Line ("[" & Wide_Fixed.Trim (S, Both) & "]" & Img (Wide_Fixed.Index (S, "αβ")) & Img (Wide_Fixed.Count (S, To_Set ("α"))));
   Wide_Fixed.Move ("δέκα", T, Justify => Center, Pad => '·');
   Put_Line (T);
   Put_Line (Wide_Fixed.Translate ("abc", To_Mapping ("ab", "αβ")) & " " & To_Upper (Wide_String'("ωμέγα")));
   Append (U, "τα");
   Insert (U, 1, "«");
   Put_Line (To_Wide_String (U) & Img (Length (U)) & Img (Index (U, "μ", Backward)));
   W12.Append (B, '!');
   Put_Line (W12.To_Wide_String (B) & " " & W12.To_Wide_String (W12.Overwrite (B, 1, "Λ")) & Img (W12.Length (B)));
   Put_Line (Img (Is_Letter ('ω')) & " " & Img (Is_Digit ('٣')) & " " & Img (Is_Upper ('Ω')));
end Main;
