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.