Top "String-formatting" questions

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

Objective-C formatting string for boolean?

What formatter is used for boolean values? EDIT: Example: NSLog(@" ??", BOOL_VAL);, what is ?? ?

objective-c string nsstring string-formatting
How to format a lua string with a boolean variable?

I have a boolean variable whose value I'd like to display in a formatted string. I tried using string.format, …

lua string-formatting
Warning: "format not a string literal and no format arguments"

Since upgrading to the latest Xcode 3.2.1 and Snow Leopard, I've been getting the warning "format not a string literal and …

objective-c warnings string-formatting nslog
How to format TimeSpan in XAML

I am trying to format a textblock which is bound to a TimeSpan property. It works if the property is …

c# wpf xaml data-binding string-formatting
Converting MM:SS.ms to seconds using MS excel

I am looking for a neat way of converting a cell from Minutes:Seconds.Milliseconds to Seconds.Milliseconds i.e. 11.111 = 11.111 1:11.111 = 71.111 …

excel time string-formatting data-conversion seconds
How to use StringFormat in XAML elements?

I'm deep in a XAML stack of elements binding to orders. The order date displays as e.g. "12/31/2008 12:00:00 AM". I …

xaml string-formatting
What is Ruby equivalent of Python's `s= "hello, %s. Where is %s?" % ("John","Mary")`

In Python, this idiom for string formatting is quite common s = "hello, %s. Where is %s?" % ("John","Mary") What is …

python ruby string-formatting
Add separator to string at every N characters?

I have a string which contains binary digits. How to separate string after each 8 digit? Suppose the string is: string …

c# string grouping string-formatting
How to implement conditional string formatting?

I've been working on a text-based game in Python, and I've come across an instance where I want to format …

python string-formatting
Named string formatting in C#

Is there any way to format a string by name rather than position in C#? In python, I can do …

c# .net-3.5 string-formatting