Open enix223 opened 7 years ago
rindexOf is used to get the last occurrence of the given substring. It is a reverse version of indexOf.
rindexOf
indexOf
Sample usage as below: rindexOf(substring)
"hello".rindexOf("hell"), // 0 "helloll".rindexOf("ll"), // 5 "hello".rindexOf("world") // nil
Test case for the new method is provided.
rindexOf
is used to get the last occurrence of the given substring. It is a reverse version ofindexOf
.Sample usage as below: rindexOf(substring)
Test case for the new method is provided.