Subj : printf and color codes
To   : Digital Man
From : Nightfox
Date : Sun Jan 20 2013 06:14 pm

Hi DM -

I'm not sure if this is a bug or is intentional, but the JavaScript printf
function doesn't seem to account for color codes (or perhaps non-printable
characters in general) when printing strings with a specific field length.  For
instance:

var name = "Bob Smith";
printf("%-25s", name);

That prints "Bob Smith" in a field with 25 characters as you'd expect, but if
the string has any non-printable characters in it, each non-printable character
subtracts 1 from the field length when the string is printed out.  CTRL-A color
codes have this effect when used with printf.

Nightfox


---
� Synchronet � Digital Distortion BBS - digitaldistortionbbs.com