_.endsWith(检测结尾字符串)
Last updated
Was this helpful?
Last updated
Was this helpful?
语法:
源代码链接:
npm包链接:
描述:
检查字符串string
是否以给定的target
字符串结尾。
开始版本:3.0.0
参数:
[string=''] (string)
: 要检索的字符串。
[target] (string)
: 要检索字符。
[position=string.length] (number)
: 检索的位置。 返回值:
(boolean)
: 如果字符串string以target字符串结尾,那么返回 true,否则返回 false。
例子: