Find the last index of a character in a string

Viewed 6612

I want to have ability to use a lastIndexOf method for the strings in my Lua (Luvit) project. Unfortunately there's no such method built-in and I'm bit stuck now.

In Javascript it looks like:

'my.string.here.'.lastIndexOf('.')     // returns 14
5 Answers
Related