I am build an autocomplete that searches off of a CouchDB View.
I need to be able to take the final character of the input string, and replace the last character with the next letter of the english alphabet. (No need for i18n here)
For Example:
OR
(in case you're wondering, I'm making sure to include the option inclusive_end=false
so that this extra character doesn't taint my resultset)
indexOf()
?my_string.substring(0, my_string.length - 1)
+ String.fromCharCode(my_string.charCodeAt(my_string.length - 1) + 1)