blob: bd26013d8f5acdda73c76f8253278421bd9f21a4 [file] [log] [blame]
var makeString = require('./makeString');
module.exports = function adjacent(str, direction) {
str = makeString(str);
if (str.length === 0) {
return '';
}
return str.slice(0, -1) + String.fromCharCode(str.charCodeAt(str.length - 1) + direction);
};