Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,6 +0,0 @@
let match1 s1 s2 =
let len1 = String.length s1
and len2 = String.length s2 in
if len1 < len2 then false else
let sub = String.sub s1 0 len2 in
(sub = s2)

View file

@ -1,10 +0,0 @@
let match2 s1 s2 =
let len1 = String.length s1
and len2 = String.length s2 in
if len1 < len2 then false else
let rec aux i =
if i < 0 then false else
let sub = String.sub s1 i len2 in
if (sub = s2) then true else aux (pred i)
in
aux (len1 - len2)

View file

@ -1,6 +0,0 @@
let match3 s1 s2 =
let len1 = String.length s1
and len2 = String.length s2 in
if len1 < len2 then false else
let sub = String.sub s1 (len1 - len2) len2 in
(sub = s2)

View file

@ -1,10 +0,0 @@
let match2_loc s1 s2 =
let len1 = String.length s1
and len2 = String.length s2 in
if len1 < len2 then (false, -1) else
let rec aux i =
if i < 0 then (false, -1) else
let sub = String.sub s1 i len2 in
if (sub = s2) then (true, i) else aux (pred i)
in
aux (len1 - len2)

View file

@ -1,12 +0,0 @@
let match2_num s1 s2 =
let len1 = String.length s1
and len2 = String.length s2 in
if len1 < len2 then (false, 0) else
let rec aux i n =
if i < 0 then (n <> 0, n) else
let sub = String.sub s1 i len2 in
if (sub = s2)
then aux (pred i) (succ n)
else aux (pred i) (n)
in
aux (len1 - len2) 0