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)

Need a custom currency format to use with String.Format

I'm trying to use String.Format("{0:c}", somevalue) in C# but am having a hard time figuring out how to …

c# currency string.format
String.Format vs ToString()

Can anyone explain if there is any benefit in either one of the following methods: decimal d = 12.0m; // 1. how I'd …

c# tostring string.format
Format string with dashes

I have a compressed string value I'm extracting from an import file. I need to format this into a parcel …

c# .net string.format
vsprintf or sprintf with named arguments, or simple template parsing in PHP

I'm searching for a way to use named arguments for sprintf or printf. Example: sprintf( 'Last time logged in was %…

php templates printf string.format named-parameters
Convert string to IP address format

I'm reading IP address numbers from database in a int format but I want to show them in IP format …

c# string.format
String.Format vs "string" + "string" or StringBuilder?

Possible Duplicates: Is String.Format as efficient as StringBuilder C# String output: format or concat? What is the performance priority …

.net performance stringbuilder string-concatenation string.format
escaping formatting characters in java String.format

This question is pretty much the same as this .Net question exept for java. How do you escape the %1$ characters …

java string string.format
Printing boolean values True/False with the format() method in Python

I was trying to print a truth table for Boolean expressions. While doing this, I stumbled upon the following: >&…

python python-2.7 boolean string-formatting string.format
named String.Format, is it possible?

Instead of using {0} {1}, etc. I want to use {title} instead. Then fill that data in somehow (below I used a …

c# string.format
Using BoundField.DataFormatString to format currency data, no $'s and negative numbers should be in ( )'s

I have a gridview that I am populating with data for the folks in accounting and they want me to …

c# asp.net string.format boundfield