diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-07 16:19:12 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-07 16:19:12 -0500 |
| commit | 7eb1fbf5d2d632bbd98fc3fa7cff777197a63d34 (patch) | |
| tree | 7238baa1f07ebc077473a49300992db846b2b606 /environment.c | |
| parent | d590b9d386977d342fc3580e473219d5b9e38503 (diff) | |
Add proper language support for case operations on text
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/environment.c b/environment.c index d37d19ef..f283e693 100644 --- a/environment.c +++ b/environment.c @@ -395,6 +395,7 @@ env_t *new_compilation_unit(CORD libname) {"by_match", "Text$by_match", "func(text:Text, pattern:Pattern -> func(->Match?))"}, {"by_split", "Text$by_split", "func(text:Text, pattern=$Pattern'' -> func(->Text?))"}, {"bytes", "Text$utf8_bytes", "func(text:Text -> [Byte])"}, + {"caseless_equals", "Text$equal_ignoring_case", "func(a,b:Text, language=\"C\" -> Bool)"}, {"codepoint_names", "Text$codepoint_names", "func(text:Text -> [Text])"}, {"ends_with", "Text$ends_with", "func(text,suffix:Text -> Bool)"}, {"each", "Text$each", "func(text:Text, pattern:Pattern, fn:func(match:Match), recursive=yes)"}, @@ -409,7 +410,7 @@ env_t *new_compilation_unit(CORD libname) {"has", "Text$has", "func(text:Text, pattern:Pattern -> Bool)"}, {"join", "Text$join", "func(glue:Text, pieces:[Text] -> Text)"}, {"lines", "Text$lines", "func(text:Text -> [Text])"}, - {"lower", "Text$lower", "func(text:Text -> Text)"}, + {"lower", "Text$lower", "func(text:Text, language=\"C\" -> Text)"}, {"map", "Text$map", "func(text:Text, pattern:Pattern, fn:func(match:Match -> Text), recursive=yes -> Text)"}, {"matches", "Text$matches", "func(text:Text, pattern:Pattern -> [Text]?)"}, {"quoted", "Text$quoted", "func(text:Text, color=no -> Text)"}, @@ -420,10 +421,10 @@ env_t *new_compilation_unit(CORD libname) {"slice", "Text$slice", "func(text:Text, from=1, to=-1 -> Text)"}, {"split", "Text$split", "func(text:Text, pattern=$Pattern'' -> [Text])"}, {"starts_with", "Text$starts_with", "func(text,prefix:Text -> Bool)"}, - {"title", "Text$title", "func(text:Text -> Text)"}, + {"title", "Text$title", "func(text:Text, language=\"C\" -> Text)"}, {"to", "Text$to", "func(text:Text, last:Int -> Text)"}, {"trim", "Text$trim", "func(text:Text, pattern=$/{whitespace}/, trim_left=yes, trim_right=yes -> Text)"}, - {"upper", "Text$upper", "func(text:Text -> Text)"}, + {"upper", "Text$upper", "func(text:Text, language=\"C\" -> Text)"}, {"utf32_codepoints", "Text$utf32_codepoints", "func(text:Text -> [Int32])"}, )}, {"Thread", THREAD_TYPE, "Thread_t", "Thread", TypedArray(ns_entry_t, |
