2017-07-15 170 views

回答

0
function removeSmallString(smallStr, largeStr) { 
    while (largeStr.indexOf(smallStr) !== -1) { 
     var index = largeStr.indexOf(smallStr); 
     largeStr = largeStr.substr(0, index) + largeStr.substr(index + smallStr.length) 
    } 
    return largeStr; 
} 
+0

https://jsfiddle.net/ce2h9fuo/ –

+0

Thanh你編程的樂趣 –

相關問題