-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')

6
  • 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. Commented Oct 11, 2012 at 19:45
  • My question was if there is a built in solution, why do you rate my question baddly? Commented Oct 11, 2012 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 is one such reference. Though I don't use jQuery, it has a well documented API as well. Commented Oct 11, 2012 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? Commented Oct 12, 2012 at 17:29
  • The idea that you'd consider coding without reading the entire API documentation amazes me. Commented Oct 12, 2012 at 17:57

1 Answer 1

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/

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.