Skip to content

Commit d870afd

Browse files
committed
Sync all the docstring texts from sort-array-string.mdx
1 parent b5f8250 commit d870afd

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

jscomp/others/belt_SortArrayString.mli

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
(* ```res prelude
2+
* type element = string
3+
* ```
4+
*)
15

26
# 2 "others/sort.cppo.mli"
37
(* Copyright (C) 2017 Authors of ReScript
@@ -36,35 +40,34 @@ type element = string
3640
# 39 "others/sort.cppo.mli"
3741
val strictlySortedLength: element array -> int
3842
(**
39-
The same as [`Belt_SortArray.strictlySortedLength`]() except the comparator is fixed
43+
The same as `Belt.SortArray.strictlySortedLength` except the comparator is fixed.
4044
41-
**return** `+n` means increasing order `-n` means negative order
45+
Returns `+n` means increasing order `-n` means negative order.
4246
*)
4347

4448

4549
val isSorted: element array -> bool
46-
(** `sorted xs` return true if `xs` is in non strict increasing order *)
50+
(** `isSorted(xs)` return true if `xs` is in non strict increasing order. *)
4751

4852
val stableSortInPlace: element array -> unit
4953
(**
50-
The same as [`Belt_SortArray.stableSortInPlaceBy`]() except the comparator is fixed
54+
The same as `Belt.SortArray.stableSortInPlaceBy` except the comparator is fixed.
5155
*)
5256

5357
val stableSort: element array -> element array
54-
(** The same as [`Belt_SortArray.stableSortBy`]() except the comparator is fixed *)
58+
(** The same as `Belt.SortArray.stableSortBy` except the comparator is fixed. *)
5559

5660
val binarySearch: element array -> element -> int
5761
(**
58-
If value is not found and value is less than one or more elements in array,
59-
the negative number returned is the bitwise complement of the index of the first element
62+
If value is not found and value is less than one or more elements in array, the
63+
negative number returned is the bitwise complement of the index of the first element
6064
that is larger than value.
6165
62-
If value is not found and value is greater than all elements in array,
63-
the negative number returned is the bitwise complement of
64-
(the index of the last element plus 1)
66+
If value is not found and value is greater than all elements in array, the negative
67+
number returned is the bitwise complement of (the index of the last element plus 1)
6568
66-
for example, if `key` is smaller than all elements return `-1` since `lnot (-1) = 0`
67-
if `key` is larger than all elements return `- (len + 1)` since `lnot (-(len+1)) = len`
69+
for example, if `key` is smaller than all elements return `-1` since `lnot(-1) = 0`
70+
if `key` is larger than all elements return `- (len + 1)` since `lnot(-(len+1)) = len`.
6871
*)
6972

7073
(**/**)

0 commit comments

Comments
 (0)