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 -1
View File
@@ -1,4 +1,4 @@
(library
(name helpers)
(modules latex_helper)
(modules latex_helper text_helper)
(libraries pgn_to_tex_internal))
+8
View File
@@ -0,0 +1,8 @@
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