Skip to content

Commit 752eca3

Browse files
authored
Merge pull request #7549 from roc-lang/str-docs-tweaks
Tweak some `Str` documentation
2 parents b0a4a64 + f361117 commit 752eca3

File tree

1 file changed

+6
-6
lines changed
  • crates/compiler/builtins/roc

1 file changed

+6
-6
lines changed

crates/compiler/builtins/roc/Str.roc

+6-6
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@ drop_suffix = |haystack, suffix|
13381338
##
13391339
## This function is useful for things like [command-line options](https://en.wikipedia.org/wiki/Command-line_interface#Command-line_option)
13401340
## and [environment variables](https://en.wikipedia.org/wiki/Environment_variable)
1341-
## know in advance that you're dealing with a hardcoded string containing only ASCII characters.
1341+
## where you know in advance that you're dealing with a hardcoded string containing only ASCII characters.
13421342
## It has better performance than lowercasing operations which take Unicode into account.
13431343
##
13441344
## That said, strings received from user input can always contain
@@ -1350,7 +1350,7 @@ drop_suffix = |haystack, suffix|
13501350
## for Unicode capitalization that can be upgraded independently from the language's builtins.
13511351
##
13521352
## To do a case-insensitive comparison of the ASCII characters in a string,
1353-
## use [Str.caseless_ascii_equals].
1353+
## you can use [Str.caseless_ascii_equals].
13541354
with_ascii_lowercased : Str -> Str
13551355

13561356
expect Str.with_ascii_lowercased("CAFÉ") == "cafÉ"
@@ -1365,7 +1365,7 @@ expect Str.with_ascii_lowercased("CAFÉ") == "cafÉ"
13651365
## This function is useful for things like
13661366
## [command-line options](https://en.wikipedia.org/wiki/Command-line_interface#Command-line_option)
13671367
## and [environment variables](https://en.wikipedia.org/wiki/Environment_variable)
1368-
## know in advance that you're dealing with a hardcoded string containing only ASCII characters.
1368+
## where you know in advance that you're dealing with a hardcoded string containing only ASCII characters.
13691369
## It has better performance than lowercasing operations which take Unicode into account.
13701370
##
13711371
## That said, strings received from user input can always contain
@@ -1378,7 +1378,7 @@ expect Str.with_ascii_lowercased("CAFÉ") == "cafÉ"
13781378
## that can be upgraded independently from the language's builtins.
13791379
##
13801380
## To do a case-insensitive comparison of the ASCII characters in a string,
1381-
## use [Str.caseless_ascii_equals].
1381+
## you can use [Str.caseless_ascii_equals].
13821382
with_ascii_uppercased : Str -> Str
13831383

13841384
expect Str.with_ascii_uppercased("café") == "CAFé"
@@ -1412,8 +1412,8 @@ expect Str.with_ascii_uppercased("café") == "CAFé"
14121412
## so we have separate [`unicode` package](https://github.com/roc-lang/unicode)
14131413
## for Unicode capitalization that can be upgraded independently from the language's builtins.
14141414
##
1415-
## To convert a string's ASCII characters to uppercase or lowercase, use [Str.with_ascii_uppercased]
1416-
## and [Str.with_ascii_lowercased].
1415+
## To convert a string's ASCII characters to uppercase or lowercase, you can use [Str.with_ascii_uppercased]
1416+
## or [Str.with_ascii_lowercased].
14171417
caseless_ascii_equals : Str, Str -> Bool
14181418

14191419
expect Str.caseless_ascii_equals("café", "CAFé")

0 commit comments

Comments
 (0)