From a1ba45b28c94244d2e1c6f00372d51d294cc3edc Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 20 Oct 2026 11:01:52 +0000 Subject: feat(library): add experimental string LCASE overloads Co-Authored-By: Claude Opus 5.5 --- pseudocode-lib/_exp_string.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pseudocode-lib/_exp_string.cc') diff --git a/pseudocode-lib/_exp_string.cc b/pseudocode-lib/_exp_string.cc index d406274..6155319 100644 --- a/pseudocode-lib/_exp_string.cc +++ b/pseudocode-lib/_exp_string.cc @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -88,6 +89,18 @@ void _exp_string_impl_mid(void *Target, void *Handle, long long Start, long long text(Target) = Source.substr(Position, Length); }); } +void _exp_string_impl_lcase(void *Target, void *Handle) { + checked([&] { + text(Target) = text(Handle); + for (char &Ch : text(Target)) + Ch = static_cast(std::tolower(static_cast(Ch))); + }); +} +char _exp_string_impl_lcase_char(char Ch) { + return checked([&] { + return static_cast(std::tolower(static_cast(Ch))); + }); +} void _exp_string_impl_output(void *Handle) { checked([&] { const auto &Text = text(Handle); -- cgit v1.3.1-4-g156e