Switch node
This commit is contained in:
@@ -610,3 +610,15 @@ export async function readFileToText(file: File): Promise<string> {
|
||||
reader.readAsText(file);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function nextLetter(s: string): string {
|
||||
return s.replace(/([a-zA-Z])[^a-zA-Z]*$/, function(a) {
|
||||
var c = a.charCodeAt(0);
|
||||
switch (c) {
|
||||
case 90: return 'A';
|
||||
case 122: return 'a';
|
||||
default: return String.fromCharCode(++c);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user