mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Add Str.chompCodePoint
This commit is contained in:
parent
8c981d8737
commit
4533ee034c
1 changed files with 4 additions and 0 deletions
|
@ -389,6 +389,10 @@ parseCodePoint : Str -> Result { val : U32, rest : Str } [ Expected [ CodePoint
|
|||
## after the second.
|
||||
chomp : Str, Str -> Result Str [ Expected [ ExactStr Str ]* Str ]*
|
||||
|
||||
## If the string begins with a [Unicode code point](http://www.unicode.org/glossary/#code_point)
|
||||
## equal to the given [U32], return whatever comes after that code point.
|
||||
chompCodePoint : Str, U32 -> Result Str [ Expected [ ExactCodePoint U32 ]* Str ]*
|
||||
|
||||
## If the string begins with digits which can represent a valid #U8, return
|
||||
## that number along with the rest of the string after the digits.
|
||||
parseU8 : Str -> Result { val : U8, rest : Str } [ Expected [ NumU8 ]* Str ]*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue