endsWith()
描述
测试一个字串结尾和另一个字串结尾是否相同。
语法
string.endsWith(string2)
参数
string
: String 物件 (字串)
string2
: 另一个 String 物件 (字串)
回传
true: 假如 string
字串的结尾与 string2
字串的结尾相同
false: 与上面相反
范例
See also
- String
- startsWith()
The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.