Added better error checking to str_repl.
Authored by: dwarren 2017-12-11
Parent: [r9174]
Child: [r9176]