mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +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
|
||||
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 ]
|
||||
imports []
|
||||
## # Types
|
||||
exposes
|
||||
[
|
||||
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
|
||||
## to the basics.
|
||||
##
|
||||
|
|
|
@ -48,6 +48,7 @@ pub fn standard_stdlib() -> StdLib {
|
|||
Symbol::SET_SET,
|
||||
Symbol::DICT_DICT,
|
||||
Symbol::STR_STR,
|
||||
Symbol::STR_USV,
|
||||
]
|
||||
.into_iter()
|
||||
.collect(),
|
||||
|
|
|
@ -889,6 +889,7 @@ define_builtins! {
|
|||
13 STR_UT8_PROBLEM: "Utf8Problem" // the Utf8Problem type alias
|
||||
14 STR_UT8_BYTE_PROBLEM: "Utf8ByteProblem" // the Utf8ByteProblem type alias
|
||||
15 STR_TO_BYTES: "toBytes"
|
||||
16 STR_USV: "Usv" imported // the Str.Usv type alias
|
||||
}
|
||||
4 LIST: "List" => {
|
||||
0 LIST_LIST: "List" imported // the List.List type alias
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue