Return a new string with removed white space from the end of the original string
返回一个新字符串,该字符串从原始字符串的末尾删除了空白
'Testing'.trimEnd() //'Testing'
' Testing'.trimEnd() //' Testing'
' Testing '.trimEnd() //' Testing'
'Testing '.trimEnd() //'Testing'
本文介绍了一种在JavaScript中去除字符串尾部空白的方法,使用.trimEnd()函数可以有效地创建一个新字符串,该字符串从原始字符串的末尾删除了空白。
Return a new string with removed white space from the end of the original string
返回一个新字符串,该字符串从原始字符串的末尾删除了空白
'Testing'.trimEnd() //'Testing'
' Testing'.trimEnd() //' Testing'
' Testing '.trimEnd() //' Testing'
'Testing '.trimEnd() //'Testing'
2294
1000

被折叠的 条评论
为什么被折叠?
方法&spm=1001.2101.3001.5002&articleId=108342160&d=1&t=3&u=c06f08d322ed47e480c3d9cc712b715a)