return Left <= Super_To_String (Right);
end Less_Or_Equal;
+ ---------------
+ -- Put_Image --
+ ---------------
+
+ procedure Put_Image
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class;
+ Source : Super_String) is
+ begin
+ String'Put_Image (S, Super_To_String (Source));
+ end Put_Image;
+
----------------------
-- Set_Super_String --
----------------------
with Ada.Strings.Maps; use type Ada.Strings.Maps.Character_Mapping_Function;
with Ada.Strings.Search;
+with Ada.Strings.Text_Buffers;
package Ada.Strings.Superbounded with SPARK_Mode is
pragma Preelaborate;
with
Predicate =>
Current_Length <= Max_Length
- and then Data (1 .. Current_Length)'Initialized;
+ and then Data (1 .. Current_Length)'Initialized,
+ Put_Image => Put_Image;
-- The subprograms defined for Super_String are similar to those
-- defined for Bounded_String, except that they have different names, so
- (Item.Max_Length - K) mod Super_Length (Item)))),
Global => null;
+ procedure Put_Image
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class;
+ Source : Super_String);
+
private
-- Pragma Inline declarations
-- --
------------------------------------------------------------------------------
+with Ada.Strings.UTF_Encoding.Strings;
with Ada.Strings.UTF_Encoding.Wide_Strings;
with Ada.Strings.UTF_Encoding.Wide_Wide_Strings;
procedure Put (Buffer : in out Buffer_Type; Item : String) is
begin
- Put_UTF_8 (Buffer, Item);
+ Put_UTF_8 (Buffer, UTF_Encoding.Strings.Encode (Item));
end Put;
procedure Wide_Put (Buffer : in out Buffer_Type; Item : Wide_String) is
return Left <= Right.Data (1 .. Right.Current_Length);
end Less_Or_Equal;
+ ---------------
+ -- Put_Image --
+ ---------------
+
+ procedure Put_Image
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class;
+ Source : Super_String) is
+ begin
+ Wide_String'Put_Image (S, Super_To_String (Source));
+ end Put_Image;
+
----------------------
-- Set_Super_String --
----------------------
-- Strings.Wide_Bounded.Generic_Bounded_Length use this type with
-- an appropriate discriminant value set.
+with Ada.Strings.Text_Buffers;
with Ada.Strings.Wide_Maps;
package Ada.Strings.Wide_Superbounded is
-- no longer necessary, because we now special-case this type in the
-- compiler, so "=" composes properly for descendants of this type.
-- Leaving it out is more efficient.
- end record;
+ end record
+ with Put_Image => Put_Image;
-- The subprograms defined for Super_String are similar to those defined
-- for Bounded_Wide_String, except that they have different names, so that
Item : Super_String;
Drop : Truncation := Error) return Super_String;
+ procedure Put_Image
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class;
+ Source : Super_String);
+
private
-- Pragma Inline declarations
return Left <= Right.Data (1 .. Right.Current_Length);
end Less_Or_Equal;
+ ---------------
+ -- Put_Image --
+ ---------------
+
+ procedure Put_Image
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class;
+ Source : Super_String) is
+ begin
+ Wide_Wide_String'Put_Image (S, Super_To_String (Source));
+ end Put_Image;
+
----------------------
-- Set_Super_String --
----------------------
-- Strings.Wide_Wide_Bounded.Generic_Bounded_Length use this type with
-- an appropriate discriminant value set.
+with Ada.Strings.Text_Buffers;
with Ada.Strings.Wide_Wide_Maps;
package Ada.Strings.Wide_Wide_Superbounded is
-- no longer necessary, because we now special-case this type in the
-- compiler, so "=" composes properly for descendants of this type.
-- Leaving it out is more efficient.
- end record;
+ end record
+ with Put_Image => Put_Image;
-- The subprograms defined for Super_String are similar to those defined
-- for Bounded_Wide_Wide_String, except that they have different names, so
Item : Super_String;
Drop : Truncation := Error) return Super_String;
+ procedure Put_Image
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class;
+ Source : Super_String);
+
private
-- Pragma Inline declarations