Skip to content

Commit 043310b

Browse files
Nicdlpil
authored andcommitted
Update string.slice docs
The slice function docs implied it could get two indexes, when it should get a start index and a length.
1 parent dcfa88a commit 043310b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gleam/string.gleam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ pub fn compare(a: String, b: String) -> order.Order {
189189
@external(javascript, "../gleam_stdlib.mjs", "less_than")
190190
fn less_than(a: String, b: String) -> Bool
191191

192-
/// Takes a substring given a start and end grapheme indexes. Negative indexes
192+
/// Takes a substring given a start grapheme index and a length. Negative indexes
193193
/// are taken starting from the *end* of the list.
194194
///
195195
/// ## Examples

0 commit comments

Comments
 (0)