Laid foundation for modifiers and built a couple.
This commit is contained in:
1 parent
39f5936787
commit
7fbbac4a65
4 files changed
+146
-1
No files matched your search
+22
-1
@@ -1,6 +1,7 @@
|
||||
#include "Global.h"
|
||||
#include "Exception.h"
|
||||
#include "__mysql.h"
|
||||
#include "Modifiers.h"
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -38,9 +39,29 @@ namespace jet {
|
||||
}
|
||||
|
||||
coreutils::MString& Global::processModifier(coreutils::MString &value, coreutils::MString &modifier) {
|
||||
Modifiers modifiers;
|
||||
if(modifier.getLength() == 0)
|
||||
return value;
|
||||
lastConverted = modifier;
|
||||
if(modifier == "tobinary")
|
||||
modifiers.processToBinaryModifier(value, lastConverted);
|
||||
if(modifier == "frombinary")
|
||||
modifiers.processFromBinaryModifier(value, lastConverted);
|
||||
if(modifier == "tohex")
|
||||
modifiers.processToHexModifier(value, lastConverted);
|
||||
if(modifier == "fromhex")
|
||||
modifiers.processFromHexModifier(value, lastConverted);
|
||||
if(modifier == "tobase64")
|
||||
modifiers.processToBase64Modifier(value, lastConverted);
|
||||
if(modifier == "frombase64")
|
||||
modifiers.processFromBase64Modifier(value, lastConverted);
|
||||
if(modifier == "toupper")
|
||||
modifiers.processToUpperModifier(value, lastConverted);
|
||||
if(modifier == "tolower")
|
||||
modifiers.processToLowerModifier(value, lastConverted);
|
||||
if(modifier == "tocgi")
|
||||
modifiers.processToCGIModifier(value, lastConverted);
|
||||
if(modifier == "fromcgi")
|
||||
modifiers.processFromCGIModifier(value, lastConverted);
|
||||
return lastConverted;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user