rename stringWidth; add some comments

This commit is contained in:
Jörg Breitbart
2018-09-14 14:15:27 +02:00
parent 8664f54a76
commit 57bbbda7e8
2 changed files with 10 additions and 9 deletions
+1 -2
View File
@@ -172,9 +172,8 @@ export const wcwidth = (function(opts: {nul: number, control: number}): (ucs: nu
/**
* Get the terminal cell width for a string.
* @param s
*/
export function stringWidth(s: string): number {
export function getStringCellWidth(s: string): number {
let result = 0;
for (let i = 0; i < s.length; ++i) {
let code = s.charCodeAt(i);