Door Games Unlimited

Welcome, Guest.


Subject: console.putmsg alternative that returns a string Date: Sun Oct 05 2014 09:51:55
From: Nightfox To: Psi-Jack

  Re: console.putmsg alternative that returns a string
  By: Psi-Jack to Nightfox on Wed Oct 01 2014 09:32:55

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

That seems to work well.  I'm curious, how did you find that you could use an
anonymous function for the replacement value in the JavaScript string replace()
method?  I've often referred to the w3schools.com JavaScript documentation, and
their documentation for the string replace() method seems to imply that it
expects a string for the replacement value:
www.w3schools.com/jsref/jsref_replace.asp

Nightfox

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

Previous Message       Next Message
In Reply To: console.putmsg alternative that returns a string (Psi-Jack)
Replies: console.putmsg alternative that returns a string (Psi-Jack)console.putmsg alternative that returns a string (Deuce)