how to replace some string(s) from a source string which shouldn't be changed upper/lowercase of sou

Posted by Sadegh on Stack Overflow See other posts from Stack Overflow or by Sadegh
Published on 2010-06-01T20:59:17Z Indexed on 2010/06/01 21:03 UTC
Read the original article Hit count: 191

Filed under:

hi, i want to replace some string(s) from a source string. so that shouldn't be changed upper/lowercase of source string. how i can do this? I'm using Replace .NET string type method such below:

var source = "Sadegh";
var word = "sadegh";
var replaced = source.Replace(word, "<strong>" + word + "</strong>");

and replace is: sadegh but i want Sadegh

thanks in advance.

© Stack Overflow or respective owner

Related posts about c#