mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 12:47:13 +02:00
* Fix line feed losing a character
* Fix wrapping when tabs are involved
This commit is contained in:
parent
8a75dbc91f
commit
2632c150ac
2 changed files with 95 additions and 33 deletions
|
@ -4,10 +4,11 @@
|
|||
var miscUtil = require('./misc_util.js');
|
||||
|
||||
|
||||
exports.stylizeString = stylizeString;
|
||||
exports.pad = pad;
|
||||
exports.replaceAt = replaceAt;
|
||||
exports.isPrintable = isPrintable;
|
||||
exports.stylizeString = stylizeString;
|
||||
exports.pad = pad;
|
||||
exports.replaceAt = replaceAt;
|
||||
exports.isPrintable = isPrintable;
|
||||
exports.debugEscapedString = debugEscapedString;
|
||||
|
||||
// :TODO: create Unicode verison of this
|
||||
var VOWELS = [ 'a', 'e', 'i', 'o', 'u' ];
|
||||
|
@ -168,4 +169,8 @@ function isPrintable(s) {
|
|||
function stringLength(s) {
|
||||
// :TODO: See https://mathiasbynens.be/notes/javascript-unicode
|
||||
return s.length;
|
||||
}
|
||||
|
||||
function debugEscapedString(s) {
|
||||
return JSON.stringify(s).slice(1, -1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue