Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them, it only takes a minute:

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

share|improve this question

marked as duplicate by Jeremy J Starcher, Eric J., sachleen, Kirk Woll, naveen Oct 11 '12 at 19:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

1 Answer 1

up vote 1 down vote accepted

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/

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.