--------------------------------------------------------
function To_Unbounded_String
- (Source : String) return Unbounded_String
+ (Source : String) return Unbounded_String
with
Post => Length (To_Unbounded_String'Result) = Source'Length,
Global => null;
(Length : Natural) return Unbounded_String
with
Post =>
- Ada.Strings.Unbounded.Length (To_Unbounded_String'Result)
- = Length,
+ Ada.Strings.Unbounded.Length (To_Unbounded_String'Result) = Length,
Global => null;
-- Returns an Unbounded_String that represents an uninitialized String
-- whose length is Length.
with
Pre =>
Low - 1 <= Length (Source)
- and then (if High >= Low
- then Low - 1
- <= Natural'Last - By'Length
- - Natural'Max (Length (Source) - High, 0)
- else Length (Source) <= Natural'Last - By'Length),
+ and then (if High >= Low
+ then Low - 1
+ <= Natural'Last - By'Length
+ - Natural'Max (Length (Source) - High, 0)
+ else Length (Source) <= Natural'Last - By'Length),
Contract_Cases =>
(High >= Low =>
Length (Replace_Slice'Result)
with
Pre =>
Low - 1 <= Length (Source)
- and then (if High >= Low
- then Low - 1
- <= Natural'Last - By'Length
- - Natural'Max (Length (Source) - High, 0)
- else Length (Source) <= Natural'Last - By'Length),
+ and then (if High >= Low
+ then Low - 1
+ <= Natural'Last - By'Length
+ - Natural'Max (Length (Source) - High, 0)
+ else Length (Source) <= Natural'Last - By'Length),
Contract_Cases =>
(High >= Low =>
Length (Source)
Pre => Position - 1 <= Length (Source)
and then (if New_Item'Length /= 0
then
- New_Item'Length <= Natural'Last - (Position - 1)),
+ New_Item'Length <= Natural'Last - (Position - 1)),
Post =>
Length (Overwrite'Result)
= Natural'Max (Length (Source), Position - 1 + New_Item'Length),
Pre => Position - 1 <= Length (Source)
and then (if New_Item'Length /= 0
then
- New_Item'Length <= Natural'Last - (Position - 1)),
+ New_Item'Length <= Natural'Last - (Position - 1)),
Post =>
Length (Source)
= Natural'Max (Length (Source)'Old, Position - 1 + New_Item'Length),
Going : Direction := Forward;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural
with
- Pre => (if Length (Source) /= 0
- then From <= Length (Source))
- and then Pattern'Length /= 0,
+ Pre => (if Length (Source) /= 0 then From <= Length (Source))
+ and then Pattern'Length /= 0,
Global => null;
pragma Ada_05 (Index);
Going : Direction := Forward;
Mapping : Maps.Character_Mapping_Function) return Natural
with
- Pre => (if Length (Source) /= 0
- then From <= Length (Source))
- and then Pattern'Length /= 0,
+ Pre => (if Length (Source) /= 0 then From <= Length (Source))
+ and then Pattern'Length /= 0,
Global => null;
-
pragma Ada_05 (Index);
function Index