Skip to content

Commit 9d23e85

Browse files
authored
refactor: get rid of a bunch of [Stdune.String] uses (#1479)
Signed-off-by: Rudi Grinberg <[email protected]>
1 parent 60bf40a commit 9d23e85

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

ocaml-lsp-server/src/import.ml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,50 @@ module Option = struct
6464
end
6565

6666
module String = struct
67-
include Stdune.String
67+
type t = string
6868

69-
let strip = trim
69+
include struct
70+
open Stdune.String
71+
module Map = Map
72+
end
73+
74+
let to_dyn = Dyn.string
7075

7176
include struct
7277
open Base.String
7378

79+
let unsafe_get = unsafe_get
80+
let get = get
81+
let split_lines = split_lines
82+
let sub = sub
83+
let equal = equal
84+
let rsplit2 = rsplit2
85+
let concat = concat
86+
let length = length
87+
let strip = strip
88+
let trim = strip
89+
let drop = drop_prefix
90+
let hash = hash
91+
let drop_prefix = chop_prefix
92+
let is_prefix = is_prefix
93+
let map = map
94+
let lowercase_ascii = lowercase
95+
let capitalize_ascii = capitalize
96+
let capitalize = capitalize
97+
let split_on_char t ~sep = split t ~on:sep
98+
let is_empty = is_empty
99+
let split = split
74100
let chop_prefix_if_exists = chop_prefix_if_exists
75101
let chop_suffix_if_exists = chop_suffix_if_exists
102+
let drop_prefix_if_exists = chop_prefix_if_exists
103+
let take = prefix
76104
let substr_index_exn = substr_index_exn
77105
let substr_index = substr_index
78106
let prefix = prefix
79107
let lfindi = lfindi
80108
let filter = filter
109+
let is_suffix = is_suffix
110+
let extract_words = Stdune.String.extract_words
81111
end
82112

83113
let findi =

0 commit comments

Comments
 (0)