#include "CSXMLHelper.h"
#include <vector>
Go to the source code of this file.
Functions | |
void | cstoupper (char *s) |
std::string | replace (const std::string &key, const std::string &predicate, const std::string &value) |
|
Definition at line 13 of file CSXMLHelperTinyXML.cpp.
00014 { 00015 int i = strlen(s); 00016 for (int e =0; e < i; e++) 00017 { 00018 s[e] = toupper(s[e]); 00019 } 00020 } |
|
Definition at line 563 of file CSXMLHelperTinyXML.cpp.
00564 { 00565 std::string newKey; 00566 std::string rest; 00567 int posStart = strstr(key.c_str(), predicate.c_str()) - key.c_str(); 00568 int len = predicate.size(); 00569 if (posStart != 0) 00570 { 00571 newKey = key.substr(0, posStart); 00572 } 00573 else 00574 { 00575 newKey = key.substr(len, key.size()-len); 00576 } 00577 newKey = newKey +value; 00578 00579 if (posStart+len < key.size()) 00580 { 00581 newKey = newKey + key.substr(posStart + len, key.size() - (posStart + len) ); 00582 } 00583 00584 return newKey; 00585 } |