From d1c450fe481112e6c3374771034780bb8b41ffe8 Mon Sep 17 00:00:00 2001 From: Brad Arant Date: Tue, 4 Feb 2025 15:43:17 -0800 Subject: [PATCH] added logic for toupper and tolower on MString. --- MString.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MString.cpp b/MString.cpp index 8b11859..4968ab1 100644 --- a/MString.cpp +++ b/MString.cpp @@ -9,6 +9,7 @@ #include #include #include +#include namespace coreutils { @@ -377,12 +378,16 @@ namespace coreutils { MString MString::toUpper() { MString target; + for(int ix = 0; ix < length; ++ix) + write(std::toupper(data[ix])); return target; } MString MString::toLower() { MString target; + for(int ix = 0; ix < length; ++ix) + write(std::tolower(data[ix])); return target; }