From 4533ee034c47e9d74f5d2a6d0e070f47e55789fd Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Sun, 2 May 2021 12:15:14 -0400 Subject: [PATCH] Add Str.chompCodePoint --- compiler/builtins/docs/Str.roc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/builtins/docs/Str.roc b/compiler/builtins/docs/Str.roc index ac23f03c60..5e5c258c4c 100644 --- a/compiler/builtins/docs/Str.roc +++ b/compiler/builtins/docs/Str.roc @@ -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 ]*