mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
Add Usv type to Str exports, and reformat Str interface generally
This commit is contained in:
parent
cf06eb8737
commit
0e39675d68
3 changed files with 43 additions and 3 deletions
|
@ -1,8 +1,46 @@
|
||||||
interface Str
|
interface Str
|
||||||
exposes [ Str, decimal, split, isEmpty, startsWith, endsWith, contains, anyGraphemes, allGraphemes, join, joinWith, padGraphemesStart, padGraphemesEnd, graphemes, reverseGraphemes, isCaseInsensitiveEq, isCaseInsensitiveNeq, walkGraphemes, isCapitalized, isAllUppercase, isAllLowercase, toUtf8, toUtf16, toUtf32, trim, walkUtf8, walkUtf16, walkUtf32, walkRevUtf8, walkRevUtf16, walkRevUtf32 ]
|
exposes
|
||||||
imports []
|
[
|
||||||
## # Types
|
Str,
|
||||||
|
Usv,
|
||||||
|
decimal,
|
||||||
|
split,
|
||||||
|
isEmpty,
|
||||||
|
startsWith,
|
||||||
|
endsWith,
|
||||||
|
contains,
|
||||||
|
anyGraphemes,
|
||||||
|
allGraphemes,
|
||||||
|
join,
|
||||||
|
joinWith,
|
||||||
|
padGraphemesStart,
|
||||||
|
padGraphemesEnd,
|
||||||
|
graphemes,
|
||||||
|
reverseGraphemes,
|
||||||
|
isCaseInsensitiveEq,
|
||||||
|
isCaseInsensitiveNeq,
|
||||||
|
walkGraphemes,
|
||||||
|
isCapitalized,
|
||||||
|
isAllUppercase,
|
||||||
|
isAllLowercase,
|
||||||
|
toUtf8,
|
||||||
|
toUtf16,
|
||||||
|
toUtf32,
|
||||||
|
trim,
|
||||||
|
walkUtf8,
|
||||||
|
walkUtf16,
|
||||||
|
walkUtf32,
|
||||||
|
walkRevUtf8,
|
||||||
|
walkRevUtf16,
|
||||||
|
walkRevUtf32
|
||||||
|
]
|
||||||
|
imports
|
||||||
|
[
|
||||||
|
Bytes.{ Bytes }
|
||||||
|
]
|
||||||
|
|
||||||
|
## # Types
|
||||||
|
##
|
||||||
## Dealing with text is a deep topic, so by design, Roc's `Str` module sticks
|
## Dealing with text is a deep topic, so by design, Roc's `Str` module sticks
|
||||||
## to the basics.
|
## to the basics.
|
||||||
##
|
##
|
||||||
|
|
|
@ -48,6 +48,7 @@ pub fn standard_stdlib() -> StdLib {
|
||||||
Symbol::SET_SET,
|
Symbol::SET_SET,
|
||||||
Symbol::DICT_DICT,
|
Symbol::DICT_DICT,
|
||||||
Symbol::STR_STR,
|
Symbol::STR_STR,
|
||||||
|
Symbol::STR_USV,
|
||||||
]
|
]
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.collect(),
|
.collect(),
|
||||||
|
|
|
@ -889,6 +889,7 @@ define_builtins! {
|
||||||
13 STR_UT8_PROBLEM: "Utf8Problem" // the Utf8Problem type alias
|
13 STR_UT8_PROBLEM: "Utf8Problem" // the Utf8Problem type alias
|
||||||
14 STR_UT8_BYTE_PROBLEM: "Utf8ByteProblem" // the Utf8ByteProblem type alias
|
14 STR_UT8_BYTE_PROBLEM: "Utf8ByteProblem" // the Utf8ByteProblem type alias
|
||||||
15 STR_TO_BYTES: "toBytes"
|
15 STR_TO_BYTES: "toBytes"
|
||||||
|
16 STR_USV: "Usv" imported // the Str.Usv type alias
|
||||||
}
|
}
|
||||||
4 LIST: "List" => {
|
4 LIST: "List" => {
|
||||||
0 LIST_LIST: "List" imported // the List.List type alias
|
0 LIST_LIST: "List" imported // the List.List type alias
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue