function To_Unbounded_String
(Source : String) return Unbounded_String
with
- Post => Length (To_Unbounded_String'Result) = Source'Length,
+ Post => To_String (To_Unbounded_String'Result) = Source,
Global => null;
-- Returns an Unbounded_String that represents Source
function To_Unbounded_String
(Length : Natural) return Unbounded_String
with
- Post =>
- Ada.Strings.Unbounded.Length (To_Unbounded_String'Result) = Length,
- Global => null;
+ SPARK_Mode => Off,
+ Global => null;
-- Returns an Unbounded_String that represents an uninitialized String
-- whose length is Length.
function To_String (Source : Unbounded_String) return String with
- Post => To_String'Result'Length = Length (Source),
+ Post =>
+ To_String'Result'First = 1
+ and then To_String'Result'Length = Length (Source),
Global => null;
-- Returns the String with lower bound 1 represented by Source
(Target : out Unbounded_String;
Source : String)
with
+ Post => To_String (Target) = Source,
Global => null;
pragma Ada_05 (Set_Unbounded_String);
-- Sets Target to an Unbounded_String that represents Source
Index : Positive) return Character
with
Pre => Index <= Length (Source),
+ Post => Element'Result = To_String (Source) (Index),
Global => null;
-- Returns the character at position Index in the string represented by
-- Source; propagates Index_Error if Index > Length (Source).
(Left : Unbounded_String;
Right : Unbounded_String) return Boolean
with
+ Post => "="'Result = (To_String (Left) = To_String (Right)),
Global => null;
function "="
(Left : Unbounded_String;
Right : String) return Boolean
with
+ Post => "="'Result = (To_String (Left) = Right),
Global => null;
function "="
(Left : String;
Right : Unbounded_String) return Boolean
with
+ Post => "="'Result = (Left = To_String (Right)),
Global => null;
function "<"
function To_Unbounded_String
(Source : String) return Unbounded_String
with
- Post => Length (To_Unbounded_String'Result) = Source'Length,
+ Post => To_String (To_Unbounded_String'Result) = Source,
Global => null;
function To_Unbounded_String
(Length : Natural) return Unbounded_String
with
- Post =>
- Ada.Strings.Unbounded.Length (To_Unbounded_String'Result) = Length,
- Global => null;
+ SPARK_Mode => Off,
+ Global => null;
function To_String (Source : Unbounded_String) return String with
- Post => To_String'Result'Length = Length (Source),
+ Post =>
+ To_String'Result'First = 1
+ and then To_String'Result'Length = Length (Source),
Global => null;
procedure Set_Unbounded_String
(Target : out Unbounded_String;
Source : String)
with
+ Post => To_String (Target) = Source,
Global => null;
pragma Ada_05 (Set_Unbounded_String);
Index : Positive) return Character
with
Pre => Index <= Length (Source),
+ Post => Element'Result = To_String (Source) (Index),
Global => null;
procedure Replace_Element
(Left : Unbounded_String;
Right : Unbounded_String) return Boolean
with
+ Post => "="'Result = (To_String (Left) = To_String (Right)),
Global => null;
function "="
(Left : Unbounded_String;
Right : String) return Boolean
with
+ Post => "="'Result = (To_String (Left) = Right),
Global => null;
function "="
(Left : String;
Right : Unbounded_String) return Boolean
with
+ Post => "="'Result = (Left = To_String (Right)),
Global => null;
function "<"