What is the fastest way (execution speed) to backslash-escape characters from a specific set? Specifically: \r, \n and \0? (i.e. I need "some\r\nstring\0" to become "some\\r\\nstring\\0")