Remove some unnecessary string copy related to substr.
Patch By: phosit
Differential Revision: https://code.wildfiregames.com/D4772