Natools

Diff
Login

Differences From Artifact [4b6fed0e78]:

To Artifact [c5e18cd3df]:


28
29
30
31
32
33
34

35
36
37
38
39
40
41
42
43
44
      return Point >= Reference.First
        and Point < Reference.First + Reference.Length;
   end Is_In;


   function Is_Subrange (Sample, Reference : String_Range) return Boolean is
   begin

      return Sample.First >= Reference.First
        and then Sample.First + Sample.Length
                   <= Reference.First + Reference.Length;
   end Is_Subrange;


   function Last (Self : String_Range) return Natural is
   begin
      return Self.First + Self.Length - 1;
   end Last;







>
|
|
|







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
      return Point >= Reference.First
        and Point < Reference.First + Reference.Length;
   end Is_In;


   function Is_Subrange (Sample, Reference : String_Range) return Boolean is
   begin
      return Sample.Length = 0
        or else (Sample.First >= Reference.First
                 and then Sample.First + Sample.Length
                            <= Reference.First + Reference.Length);
   end Is_Subrange;


   function Last (Self : String_Range) return Natural is
   begin
      return Self.First + Self.Length - 1;
   end Last;