str.replace

Also had to fix some bugs with codegen function types --
not sure how those snuck through