trim

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

  

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