Use rlib.rstring.replace instead of str.replace