劍指offer 1,輸入一個字串,將字串的空格替換成%20 function replaceSpace(str){ return str.replace(/\s/g,"%20"); } replaceSpace("we are right")