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 #480013 is a reply to message #479987] Thu, 21 March 2013 10:29 Go to previous message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma:
General (4 Stars)
I think I could do it with the StringClass truncate left and right functions after obtaining the position of the start of the matched substring.

I just need to know now how to convert the pointer returned by strstr() into a position into the base string, I assume it should be simple pointer arithmetic?


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
 
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:07:42 MST 2024

Total time taken to generate the page: 0.00722 seconds