Hello,
It depends what string you are talking about. I suppose the string is in some field you want to retrieve in your transformation using the Eval method. In this case, you can simply convert it to string and use the Replace method like this:
<%# Eval("yourField").ToString().Replace("str1", "str2") %>
Best regards,
Jan Hermann