Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | string_slices: fix Is_Subrange so that any empty range is a subrange of any range |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
96a6d2d26216d6f6a09ae267f33e36f5 |
| User & Date: | nat 2013-10-08 21:21:14.299 |
Context
|
2013-10-09
| ||
| 21:10 | chunked_strings: improive Find_Token implementation check-in: 75f285cc82 user: nat tags: trunk | |
|
2013-10-08
| ||
| 21:21 | string_slices: fix Is_Subrange so that any empty range is a subrange of any range check-in: 96a6d2d262 user: nat tags: trunk | |
|
2013-10-07
| ||
| 19:12 | string_slice_set_tests: add conversion and interval tests check-in: 1bd9bb5772 user: nat tags: trunk | |
Changes
Changes to src/natools-string_slices.adb.
| ︙ | ︙ | |||
28 29 30 31 32 33 34 |
return Point >= Reference.First
and Point < Reference.First + Reference.Length;
end Is_In;
function Is_Subrange (Sample, Reference : String_Range) return Boolean is
begin
| > | | | | 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;
|
| ︙ | ︙ |