我在 Javascript 中有一个像这样的字符串:
string = '@usernameWhats on your mind?'
我需要从字符串中删除'Whats on your mind?'
。
我该怎么做?
最佳答案
var new_string = string.replace('Whats on your mind?', '');
关于javascript - 删除 Javascript 中的字符串部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8529070/