improve safety of cname substring replacements for C++ string conversion functions: only replace first occurrence as there may be a user defined portion following