commit | 292f8a3b8b4731bbccc7f26eaef8e2ddc05c4139 | [log] [tgz] |
---|---|---|
author | Nico Huber <nico.huber@secunet.com> | Thu Feb 08 19:07:30 2024 +0100 |
committer | Nico Huber <nico.huber@secunet.com> | Thu Feb 08 19:17:08 2024 +0100 |
tree | b16b12a9fa1cc48361449472424fdcadf1cd77c3 | |
parent | ab933b8ff702816c25518bdd4eb14c51a40b7088 [diff] [blame] |
Extract Str_Buf_Equal() from ext2 driver
diff --git a/src/filo.adb b/src/filo.adb new file mode 100644 index 0000000..89e26b9 --- /dev/null +++ b/src/filo.adb
@@ -0,0 +1,13 @@ +package body FILO is + + function Equal (Str : String; Buf : Buffer_Type) return Boolean is + begin + for I in Str'Range loop + if Character'Pos (Str (I)) /= Buf (Buf'First + (I - Str'First)) then + return False; + end if; + end loop; + return True; + end Equal; + +end FILO;