diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-20 11:02:36 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-20 11:02:36 +0000 |
| commit | 496c020541d4d35e5800b813b3f8d113a8f2b90b (patch) | |
| tree | 938a85ff36482af576ecbdd9cd3745ee6d25a336 /pseudocode-lib/_exp_string.cc | |
| parent | a1ba45b28c94244d2e1c6f00372d51d294cc3edc (diff) | |
feat(library): add experimental string UCASE overloads
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'pseudocode-lib/_exp_string.cc')
| -rw-r--r-- | pseudocode-lib/_exp_string.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pseudocode-lib/_exp_string.cc b/pseudocode-lib/_exp_string.cc index 6155319..bd476b8 100644 --- a/pseudocode-lib/_exp_string.cc +++ b/pseudocode-lib/_exp_string.cc @@ -101,6 +101,18 @@ char _exp_string_impl_lcase_char(char Ch) { return static_cast<char>(std::tolower(static_cast<unsigned char>(Ch))); }); } +void _exp_string_impl_ucase(void *Target, void *Handle) { + checked([&] { + text(Target) = text(Handle); + for (char &Ch : text(Target)) + Ch = static_cast<char>(std::toupper(static_cast<unsigned char>(Ch))); + }); +} +char _exp_string_impl_ucase_char(char Ch) { + return checked([&] { + return static_cast<char>(std::toupper(static_cast<unsigned char>(Ch))); + }); +} void _exp_string_impl_output(void *Handle) { checked([&] { const auto &Text = text(Handle); |
