Top "String-formatting" questions

Commonly refers to a number of methods to display an arbitrary number of varied data types into a string.

Actionscript 3.0 String With Format?

How can i format a string with supplied variables in AS3? //vars var myNumber:Number = 12; var myString:String = "Months"; var …

actionscript-3 string-formatting
StringFormat on Combobox Displaymemberpath

I am trying to use StringFormat on DisplayMemberPath property of a ComboBox (WPF). But i don't know even if this …

wpf combobox string-formatting
iOS APNS: sending the device token to the provider in string format

I need to send the APNS device token of my iOS app to my provider by calling a service that …

ios apple-push-notifications string-formatting devicetoken
Nested f-strings

Thanks to David Beazley's tweet, I've recently found out that the new Python 3.6 f-strings can also be nested: >>&…

python python-3.x string-formatting python-3.6 f-string
"%s" % format vs "{0}".format() vs "?" format

In this post about SQLite, aaronasterling told me that cmd = "attach \"%s\" as toMerge" % "b.db" : is wrong cmd = 'attach "{0}" …

python string-formatting pysqlite
Format int as int, but float as %.3f

I have a function that expects two cutoff values, called min_df and max_df. Either may be an int …

python string-formatting python-2.5
How can I print a string using .format(), and print literal curly brackets around my replaced string

Possible Duplicate: How can I print a literal “{}” characters in python string and also use .format on it? Basically, I …

python string formatting string-formatting curly-brackets
string.format() with optional placeholders

I have the following Python code (I'm using Python 2.7.X): my_csv = '{first},{middle},{last}' print( my_csv.…

python string-formatting template-variables
c++: How do I format a double to currency with dollar sign?

I have a function that takes a double and returns it as string with thousand separators. You can see it …

c++ string string-formatting currency dollar-sign
Using locals() and format() method for strings: are there any caveats?

Are there any disadvantages, caveats or bad practice warnings about using the following pattern? def buildString(user, name = 'john', age=22): …

python string-formatting local-variables locals