mirror of
https://github.com/TheRealOwenRees/pgn_to_tex.git
synced 2026-11-18 04:42:07 +00:00
fix: address code review findings for public API
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
(library
|
||||
(name helpers)
|
||||
(modules latex_helper)
|
||||
(modules latex_helper text_helper)
|
||||
(libraries pgn_to_tex_internal))
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user