-2

Possible Duplicate:
JavaScript equivalent to printf/string.format
Equivalent of String.format in JQuery

Is there any built javascript or jquery function that behaives like .net's in string.format()?

Or like javascript's console.log string repclament?

console.log('aString %s', 'valueToReplace')

Community
  • 1
  • 1
Pato Loco
  • 1,205
  • 1
  • 13
  • 29
  • 1
    A few minutes with Google, looking for `Javascript string format` yields many hits. If that isn't powerful enough, there is a `Javascript sprintf` which is far more powerful. – Jeremy J Starcher Oct 11 '12 at 19:45
  • My question was if there is a built in solution, why do you rate my question baddly? – Pato Loco Oct 11 '12 at 19:50
  • Because a few minutes of Googling would have answered your question. All of the build-in Javascript functions and methods are well documented -- [Here](https://developer.mozilla.org/en-US/docs/JavaScript/Reference) is one such reference. Though I don't use jQuery, it has a well documented API as well. – Jeremy J Starcher Oct 11 '12 at 19:53
  • Whatever, what's the point of having a site like this then? You can alway read documentation and lots of stuff. It has no sense what you said. Am I supposed to search all the API documentation before asking a question? – Pato Loco Oct 12 '12 at 17:29
  • The idea that you'd consider coding **without** reading the entire API documentation amazes me. – Jeremy J Starcher Oct 12 '12 at 17:57
  • I'd be amazed if you had a life apart from work. I can't read the complete documentation of every technology I start to work with, lucky you! Here's a tip, print your stack's profile page and bring it with you to a club ;) I'm kitting, you rock! – Pato Loco Oct 13 '12 at 15:21

1 Answers1

1

There is no native solution, but here is one of many partial solutions: http://monocleglobe.wordpress.com/2010/01/12/everybody-needs-a-little-printf-in-their-javascript/

Billy Moon
  • 57,113
  • 24
  • 136
  • 237