剑指offer 1,输入一个字符串,将字符串的空格替换成%20 function replaceSpace(str){ return str.replace(/\s/g,"%20"); } replaceSpace("we are right")