Skip to content

Commit

Permalink
refactor: get rid of a bunch of [Stdune.String] uses
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>

<!-- ps-id: 519424b4-a47c-490a-9227-2204263abc1e -->

Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Feb 23, 2025
1 parent b203fb4 commit 57aa7bb
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions ocaml-lsp-server/src/import.ml
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,50 @@ module Option = struct
end

module String = struct
include Stdune.String
type t = string

let strip = trim
include struct
open Stdune.String
module Map = Map
end

let to_dyn = Dyn.string

include struct
open Base.String

let unsafe_get = unsafe_get
let get = get
let split_lines = split_lines
let sub = sub
let equal = equal
let rsplit2 = rsplit2
let concat = concat
let length = length
let strip = strip
let trim = strip
let drop = drop_prefix
let hash = hash
let drop_prefix = chop_prefix
let is_prefix = is_prefix
let map = map
let lowercase_ascii = lowercase
let capitalize_ascii = capitalize
let capitalize = capitalize
let split_on_char t ~sep = split t ~on:sep
let is_empty = is_empty
let split = split
let chop_prefix_if_exists = chop_prefix_if_exists
let chop_suffix_if_exists = chop_suffix_if_exists
let drop_prefix_if_exists = chop_prefix_if_exists
let take = prefix
let substr_index_exn = substr_index_exn
let substr_index = substr_index
let prefix = prefix
let lfindi = lfindi
let filter = filter
let is_suffix = is_suffix
let extract_words = Stdune.String.extract_words
end

let findi =
Expand Down

0 comments on commit 57aa7bb

Please sign in to comment.