added logic for toupper and tolower on MString.
This commit is contained in:
parent
c40e288a67
commit
d1c450fe48
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user