From 079764b8f04f4ae69a3a014224a45a04a157edad Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 20 Oct 2026 11:03:17 +0000 Subject: feat(library): add experimental string ASC overloads Co-Authored-By: Claude Opus 5.5 --- pseudocode-lib/_exp_string.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pseudocode-lib/_exp_string.cc') diff --git a/pseudocode-lib/_exp_string.cc b/pseudocode-lib/_exp_string.cc index bd476b8..6a17f74 100644 --- a/pseudocode-lib/_exp_string.cc +++ b/pseudocode-lib/_exp_string.cc @@ -113,6 +113,15 @@ char _exp_string_impl_ucase_char(char Ch) { return static_cast(std::toupper(static_cast(Ch))); }); } +long long _exp_string_impl_asc(void *Handle) { + return checked([&]() -> long long { + const auto &Source = text(Handle); + return Source.empty() ? 0 : static_cast(Source.front()); + }); +} +long long _exp_string_impl_asc_char(char Ch) { + return checked([&]() -> long long { return static_cast(Ch); }); +} void _exp_string_impl_output(void *Handle) { checked([&] { const auto &Text = text(Handle); -- cgit v1.3.1-4-g156e