File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,18 @@ package body GOTO_Utils is
3030 return R;
3131 end Make_Address_Of ;
3232
33+ function Is_Prefix (Prefix : String; Base_String : String) return Boolean
34+ is
35+ begin
36+ if Prefix'Length < Base_String'Length and then
37+ Prefix = Base_String (Base_String'First .. Prefix'Length)
38+ then
39+ return True;
40+ else
41+ return False;
42+ end if ;
43+ end Is_Prefix ;
44+
3345 -- -----------------
3446 -- Make_Int_Type --
3547 -- -----------------
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ package GOTO_Utils is
2222
2323 type String_Access is access String;
2424
25+ function Is_Prefix (Prefix : String; Base_String : String) return Boolean;
26+
2527 package Addressed_Variables is new
2628 GNAT.Table (Table_Component_Type => String_Access,
2729 Table_Index_Type => Natural,
You can’t perform that action at this time.
0 commit comments