added logic for toupper and tolower on MString.

This commit is contained in:
Brad Arant 2025-02-04 15:43:17 -08:00
parent c40e288a67
commit d1c450fe48

View File

@ -9,6 +9,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <cctype>
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;
}