aboutsummaryrefslogtreecommitdiff
path: root/pseudocode-lib/string.cc
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-23 01:19:28 +0000
committer_ov4 <ov4@ov4.org>2026-10-23 01:19:28 +0000
commit90fc80c193453e8d5038530f310fc007f9ff9789 (patch)
treee324ea2c88f63610cc5f13f0b55114f12b5b8f98 /pseudocode-lib/string.cc
parent7c681c33e17550bfc8a0dc969129a2ea855a39fe (diff)
fix(stdlib)!: return CHAR from CHR
BREAKING CHANGE: CHR now returns CHAR instead of STRING, so user overloads and templates select or deduce CHAR for CHR(...). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'pseudocode-lib/string.cc')
-rw-r--r--pseudocode-lib/string.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/pseudocode-lib/string.cc b/pseudocode-lib/string.cc
index c47899c..4395304 100644
--- a/pseudocode-lib/string.cc
+++ b/pseudocode-lib/string.cc
@@ -163,11 +163,7 @@ long long _string_impl_asc(void *Handle) {
long long _string_impl_asc_char(char Ch) {
return checked([&]() -> long long { return static_cast<unsigned char>(Ch); });
}
-void _string_impl_chr(void *Target, long long Code) {
- checked([&] {
- text(Target).assign(1, static_cast<char>(static_cast<unsigned char>(Code)));
- });
-}
+char _string_impl_chr_char(long long Code) { return static_cast<char>(static_cast<unsigned char>(Code)); }
int _string_impl_is_num(void *Handle) {
return checked([&]() -> int {
double Number = 0;