Top "String.format" questions

A method or function that takes a template string and arguments for that template and inserts these arguments into the template in an appropriate manner (programming-language-independent tag)

JavaScript equivalent to printf/String.Format

I'm looking for a good JavaScript equivalent of the C/PHP printf() or for C#/Java programmers, String.Format() (IFormatProvider …

javascript printf string.format
Why use String.Format?

Why would anyone use String.Format in C# and VB .NET as opposed to the concatenation operators (& in VB, …

c# string vb.net string.format
Equivalent of String.format in jQuery

I'm trying to move some JavaScript code from MicrosoftAjax to JQuery. I use the JavaScript equivalents in MicrosoftAjax of the …

javascript jquery string.format
Format decimal for percentage values?

What I want is something like this: String.Format("Value: {0:%%}.", 0.8526) Where %% is that format provider or whatever I am looking …

c# decimal string.format formatprovider
Is it better practice to use String.format over string Concatenation in Java?

Is there a perceptible difference between using String.format and String concatenation in Java? I tend to use String.format …

java string concatenation string.format
Pad left or right with string.format (not padleft or padright) with arbitrary string

Can I use String.Format() to pad a certain string with arbitrary characters? Console.WriteLine("->{0,18}<-", "hello"); …

c# formatting padding string.format
String output: format or concat in C#?

Let's say that you want to output or concat strings. Which of the following styles do you prefer? var p = …

c# string coding-style string.format
String.Format("{0:C2}", -1234) (Currency format) treats negative numbers as positive

I am using String.Format("{0:C2}", -1234) to format numbers. It always formats the amount to a positive number, while …

c# vb.net string-formatting currency string.format
Currency Formatting MVC

I'm trying to format an Html.EditorFor textbox to have currency formatting, I am trying to base it off of …

asp.net-mvc-3 razor string.format
How can I left-align strings using String.format()?

I'm using String.format() in Java trying to emulate the printf() control channel available in C. I understand how to …

java string alignment string.format