• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mbarbin / fingerboard / 136

16 Mar 2026 03:55PM UTC coverage: 92.138% (+0.004%) from 92.134%
136

push

github

mbarbin
Merge branch 'flatten-stdlib'

58 of 65 new or added lines in 9 files covered. (89.23%)

3832 of 4159 relevant lines covered (92.14%)

20256.24 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/src/stdlib/string0.ml
1
(**********************************************************************************)
2
(*  Fingerboard - a microtonal geography of the cello fingerboard                 *)
3
(*  Copyright (C) 2022-2024 Mathieu Barbin <mathieu.barbin@gmail.com>             *)
4
(*                                                                                *)
5
(*  This file is part of Fingerboard.                                             *)
6
(*                                                                                *)
7
(*  Fingerboard is free software: you can redistribute it and/or modify it under  *)
8
(*  the terms of the GNU Affero General Public License as published by the Free   *)
9
(*  Software Foundation, either version 3 of the License, or any later version.   *)
10
(*                                                                                *)
11
(*  Fingerboard is distributed in the hope that it will be useful, but WITHOUT    *)
12
(*  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or         *)
13
(*  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License   *)
14
(*  for more details.                                                             *)
15
(*                                                                                *)
16
(*  You should have received a copy of the GNU Affero General Public License      *)
17
(*  along with Fingerboard. If not, see <https://www.gnu.org/licenses/>.          *)
18
(**********************************************************************************)
19

20
include Stdlib.StringLabels
21

22
let chop_prefix t ~prefix =
23
  if String.starts_with t ~prefix
3,862✔
24
  then (
467✔
25
    let prefix_len = String.length prefix in
26
    Some (StringLabels.sub t ~pos:prefix_len ~len:(String.length t - prefix_len)))
467✔
27
  else None
3,395✔
28
;;
29

NEW
30
let compare a b = String.compare a b |> Ordering.of_int
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc