aboutsummaryrefslogtreecommitdiff
path: root/pseudocode-lib/_exp_string.cc
diff options
context:
space:
mode:
Diffstat (limited to 'pseudocode-lib/_exp_string.cc')
-rw-r--r--pseudocode-lib/_exp_string.cc12
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);