Top "String-formatting" questions

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

String Format % with significant figures

I am using the following code to show percentage using String.Format but I also want to limit the number …

c# string-formatting significant-digits
Can't use apostrophe in StringFormat of a XAML binding?

I'm trying use StringFormat to insert apostrophies (apostrophe's?) around a value that is bound to a TextBlock: <TextBlock Text="{…

c# wpf escaping apostrophe string-formatting
What does the dollar sign ($) do in a printf format string?

I am trying to format in java using the printf statement like in this webpage: Click Here. But I just …

java printf string-formatting system.out
In a python logging is there a formatter to truncate the string?

Python logging formats strings with a syntax I don't see elsewhere in python, like 'format': '%(name)s' Is there …

python logging formatting string-formatting formatter
Stringformat concatenates databinding and resource's value

I want to concatenate in my window title a property from my viewmodel and a value that cames from a …

wpf binding concatenation string-formatting staticresource
String.Format - How can I format to x digits (regardless of decimal place)?

I need to format a floating point number to x characters (6 in my case including the decimal point). My output …

c# string-formatting decimal-point
Leaving values blank if not passed in str.format

I've run into a fairly simple issue that I can't come up with an elegant solution for. I'm creating a …

python string-formatting missing-data
VB6 Format function: analog in .NET

There is String.Format function that is referred to in the documentation as the analog for Format function from VB6. …

.net vb.net string-formatting vb6-migration
How to format std::chrono durations?

Is there a convenient way to format std::chrono::duration to a specified format? std::chrono::high_resolution_clock::time_…

c++ c++11 string-formatting chrono
What's the shorter xaml syntax for Multibinding using StringFormat with multiple bindings?

for a single binding, we use: <TextBlock> <TextBlock.Text> <MultiBinding StringFormat="{}{0}"> <Binding Path=…

wpf xaml binding multibinding string-formatting