andyzinsser andyzinsser - 4 months ago 29
Javascript Question

What is a method that can be used to increment letters?

Does anyone know of a Javascript library (e.g. underscore, jQuery, MooTools, etc.) that offers a method of incrementing a letter?

I would like to be able to do something like:

"a"++; // would return "b"

function nextChar(c) {
    return String.fromCharCode(c.charCodeAt(0) + 1);