Door Games Unlimited

Welcome, Guest.


Subject: console.putmsg alternative that returns a string Date: Wed Oct 01 2014 09:32:55
From: Psi-Jack To: Nightfox

  Re: console.putmsg alternative that returns a string
  By: Nightfox to All on Tue Sep 30 2014 12:39 pm

 Ni> Is there an alternative to console.putmsg() that returns a string instead
 Ni> of outputting to the console?  What I'd like to do is to have @-codes,
 Ni> etc. interpreted in a string and save that string so I can then pass that
 Ni> string to printf() so I can specify a field length for the text.

I believe what you're looking for is bbs.atcode():

text = text.replace(/@([^@]+)@/g, function(m, code) {
  return bbs.atcode(code);
});

---
>>>[Psi-Jack -//- Decker]
 ■ Synchronet ■ Decker's Heaven -//- bbs.deckersheaven.com

Previous Message       Next Message
In Reply To: console.putmsg alternative that returns a string (Nightfox)
Replies: console.putmsg alternative that returns a string (Nightfox)console.putmsg alternative that returns a string (Nightfox)