fix: address code review findings for public API

This commit is contained in:
2026-10-23 16:38:24 +02:00
committed by owenrees
parent 4f50ff020e
commit 16fcaa3b13
13 changed files with 161 additions and 104 deletions
+1 -8
View File
@@ -1,13 +1,6 @@
open OUnit2
let contains ~needle haystack =
let n = String.length needle and h = String.length haystack in
let rec loop i =
if i + n > h then false
else if String.sub haystack i n = needle then true
else loop (i + 1)
in
n = 0 || loop 0
let contains = Helpers.Text_helper.contains
let read_file path =
let ic = In_channel.open_text path in