Complete a string base on index of last character
Example Word : String , the returned last index is 5 which is "g". I need to complete the word string base on the space before the word.
obj string the last index is 5, which is g, "string" word should be completed.
For other languages, Google is your friend :)