Even better, make it an Extension method to the string class.
>
>Can be optimized in that case
>
>would be like this
>
>public static string ChrTran(this string s, string[] from, string[] to)
>
>
>Of course - the length of the arrays from and to must be equal
>
>It's an extra loop. sb needs to be instantiated only once, and only once sb.ToString();
>
>
>Also, in the oiginal code above from and to are not checked for null values
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer