diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-20 11:04:06 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-20 11:04:06 +0000 |
| commit | 8975d167c849f54664be8d5da418cd909694d26f (patch) | |
| tree | ddefc52af631d09157c91a17046c333da8acec91 /pseudocode-lib/_exp_string.cc | |
| parent | 079764b8f04f4ae69a3a014224a45a04a157edad (diff) | |
feat(library): add experimental string CHR function
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 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pseudocode-lib/_exp_string.cc b/pseudocode-lib/_exp_string.cc index 6a17f74..ae53ac1 100644 --- a/pseudocode-lib/_exp_string.cc +++ b/pseudocode-lib/_exp_string.cc @@ -122,6 +122,11 @@ long long _exp_string_impl_asc(void *Handle) { long long _exp_string_impl_asc_char(char Ch) { return checked([&]() -> long long { return static_cast<unsigned char>(Ch); }); } +void _exp_string_impl_chr(void *Target, long long Code) { + checked([&] { + text(Target).assign(1, static_cast<char>(static_cast<unsigned char>(Code))); + }); +} void _exp_string_impl_output(void *Handle) { checked([&] { const auto &Text = text(Handle); |
