trim

String.prototype.myTrim = function (){
    return this.replace(/^\s+ | \s+$/g, '')
}

  

posted @ 2023-02-03 14:15  671_MrSix  阅读(25)  评论(0)    收藏  举报