![]() |
|
#1
|
|||
|
|||
String copy removing XML tags...Okay so the short and sweet im trying to write a C++ function that will remove the close tokens form an XML Document. Ie:</close> = input; output should = close. I wrote this quick function however i cant get the close to transfer to the output string. any ideas??
CPP / C++ / C Code:
|
|||
|
#2
|
||||
|
||||
Re: String copy removing XML tags...std::string.size() returns the size of the string not including the null terminator (the string class doesn't consider any null terminator in the functions exposed to the user).
If you need to remove the first and the last chars, what is the loop for? __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#3
|
||||
|
||||
Re: String copy removing XML tags...Quote:
Oh, you were copying each character in the second string. Well, since you are using C++, it can be as easy as: CPP / C++ / C Code:
Best regards, Lucian Edit: pass the input string by const reference... __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#4
|
|||
|
|||
Re: String copy removing XML tags...Sweet didn't think of that... I have to remember all that its been about a year lol...
|
Recent GIDBlog
Once again, no time for hobbies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Equation to create a Tax Liability info output | ThatDudeDave | Java Forum | 2 | 10-Dec-2008 07:53 |
| Multiple questions for C++ project | devster420 | C++ Forum | 1 | 20-Apr-2007 22:26 |
| Message Class | TransformedBG | C++ Forum | 5 | 29-Nov-2006 22:28 |
| string copy using pointers | gemini_v440 | C Programming Language | 1 | 18-Mar-2006 11:20 |
| Help wit my source code compiler errors | Krandygrl00 | C++ Forum | 1 | 06-Jun-2005 09:14 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The