# Code To Replace String, Replace("string", The3thcharacter,"\*")?

**URL:** https://forum.highend3d.com/t/code-to-replace-string-replace-string-the3thcharacter/9717
**Category:** Compositing
**Tags:** shake
**Created:** [May 10, 2006, 5:00am UTC](https://forum.highend3d.com/t/code-to-replace-string-replace-string-the3thcharacter/9717 "2006-05-10T05:00:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [May 10, 2006, 5:00am UTC](https://forum.highend3d.com/t/code-to-replace-string-replace-string-the3thcharacter/9717/1 "2006-05-10T05:00:17Z")

</div>

what's the code in C+ (shake code) that to replace a single words to a text,

say,

string Text1 = "ABCDEF...................................................."

i want to replace the 10 character in string Text1 to say \*, how?

i know i can use the strlen, and something like "ABCD... " +"\*" + "..........",

but is there any 1 simple code to enable us replace a charater everywhere in a string,

something like, replace("string", the3thCharacter,"\*")

cause i am creating a macro, but get stuck here.

thanks
