We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a5129b commit d567eeaCopy full SHA for d567eea
tools/gnatcov/strings.adb
@@ -77,7 +77,7 @@ package body Strings is
77
function Has_Prefix (S : String; Prefix : String) return Boolean is
78
Length : constant Integer := Prefix'Length;
79
begin
80
- return S'Length > Length
+ return S'Length >= Length
81
and then S (S'First .. S'First + Length - 1) = Prefix;
82
end Has_Prefix;
83
@@ -88,7 +88,7 @@ package body Strings is
88
function Has_Suffix (S : String; Suffix : String) return Boolean is
89
Length : constant Integer := Suffix'Length;
90
91
92
and then S (S'Last - Length + 1 .. S'Last) = Suffix;
93
end Has_Suffix;
94
0 commit comments