From aabc0a3cff685e31f2492c977c6562d8e0ef8ebc Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 4 Nov 2024 01:17:47 -0500 Subject: Update text API to use optional returns when applicable --- environment.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'environment.c') diff --git a/environment.c b/environment.c index 39e50b02..47e30dba 100644 --- a/environment.c +++ b/environment.c @@ -374,9 +374,9 @@ env_t *new_compilation_unit(CORD libname) {"ends_with", "Text$ends_with", "func(text,suffix:Text -> Bool)"}, {"find", "Text$find", "func(text:Text, pattern:Pattern, start=1 -> Int?)"}, {"find_all", "Text$find_all", "func(text:Text, pattern:Pattern -> [Text])"}, - {"from_bytes", "Text$from_bytes", "func(bytes:[Byte] -> Text)"}, - {"from_c_string", "Text$from_str", "func(str:CString -> Text)"}, - {"from_codepoint_names", "Text$from_codepoint_names", "func(codepoint_names:[Text] -> Text)"}, + {"from_bytes", "Text$from_bytes", "func(bytes:[Byte] -> Text?)"}, + {"from_c_string", "Text$from_str", "func(str:CString -> Text?)"}, + {"from_codepoint_names", "Text$from_codepoint_names", "func(codepoint_names:[Text] -> Text?)"}, {"from_codepoints", "Text$from_codepoints", "func(codepoints:[Int32] -> Text)"}, {"without_escaping", "Path$cleanup", "func(text:Text -> Path)"}, {"has", "Text$has", "func(text:Text, pattern:Pattern -> Bool)"}, -- cgit v1.2.3