Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Replacing a substring in a string
Re: Replacing a substring in a string [message #479997 is a reply to message #479987] Wed, 20 March 2013 00:56 Go to previous messageGo to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma:
General (5 Stars)
std::string::replace replaces a set of characters between indexes N and M with a different set of characters. Whilst it can be used as a substring replacement it takes a bit of finangling to make it work and it still needs an iterative approach so it will potentially make lots of unnecessary intermediate buffer reallocations if the new string is >= the length of the string being replaced.

http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Wed, 20 March 2013 00:56]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Renhelp.net
Next Topic: C&C_Carriers *wip*
Goto Forum:
  


Current Time: Thu Dec 26 21:06:02 MST 2024

Total time taken to generate the page: 0.01070 seconds