string.format Questions

61

Solved

I'm looking for a good JavaScript equivalent of the C/PHP printf() or for C#/Java programmers, String.Format() (IFormatProvider for .NET). My basic requirement is a thousand separator format for n...
Unreliable asked 4/3, 2009 at 12:53

61

Solved

I'm looking for a good JavaScript equivalent of the C/PHP printf() or for C#/Java programmers, String.Format() (IFormatProvider for .NET). My basic requirement is a thousand separator format for n...
Margueritamarguerite asked 4/3, 2009 at 12:53

61

Solved

I'm looking for a good JavaScript equivalent of the C/PHP printf() or for C#/Java programmers, String.Format() (IFormatProvider for .NET). My basic requirement is a thousand separator format for n...
Colwin asked 4/3, 2009 at 12:53

61

Solved

I'm looking for a good JavaScript equivalent of the C/PHP printf() or for C#/Java programmers, String.Format() (IFormatProvider for .NET). My basic requirement is a thousand separator format for n...
Nickerson asked 4/3, 2009 at 12:53

61

Solved

I'm looking for a good JavaScript equivalent of the C/PHP printf() or for C#/Java programmers, String.Format() (IFormatProvider for .NET). My basic requirement is a thousand separator format for n...
Wednesday asked 4/3, 2009 at 12:53

61

Solved

I'm looking for a good JavaScript equivalent of the C/PHP printf() or for C#/Java programmers, String.Format() (IFormatProvider for .NET). My basic requirement is a thousand separator format for n...
Paynter asked 4/3, 2009 at 12:53

2

Solved

Can anyone explain why the following occurs: String.Format(null, "foo") // Returns foo String.Format((string)null, "foo") // Throws ArgumentNullException: // Value cannot be null. // Parameter ...
Shirleenshirlene asked 21/10, 2010 at 14:30

1

Solved

string template = @" { argument1 = ""{0}""; argument2 = {1}; }"; When I format it as a usual string with string.Format, naturally i get an exception that the input string was not in correc...
Shushan asked 8/10, 2010 at 19:15

4

Solved

I am using a DataBinder.Eval expression in an ASP.NET Datagrid, but I think this question applies to String formatting in .NET in general. The customer has requested that if the value of a string i...
Stockyard asked 17/2, 2010 at 16:46

2

Solved

I was using Reflector to look at the implementation of String.Format and had always been under the impression that the overloads of String.Format that took 1, 2 & 3 arguments were optimized ver...
Shupe asked 9/5, 2010 at 5:35

2

Solved

For instance, %11.2lf in C++ becomes %11.2f in Java. How about for long format?
Judsonjudus asked 6/1, 2010 at 8:39

3

Solved

I have been all over the 'tubes and I can't figure this one out. Might be simple. The following String.Format call: return dt.ToString("MMM d yy 'at' H:mmm"); Correctly returns this: Sep 23 ...
Pavel asked 29/8, 2009 at 10:24

5

Solved

I am using VSTS 2008 + C# + .Net 2.0. When executing the following statement, there is FormatException thrown from String.Format statement, any ideas what is wrong? Here is where to get the templa...
Johniejohnna asked 13/7, 2009 at 9:45

2

Solved

Possible Duplicates: Is String.Format as efficient as StringBuilder C# String output: format or concat? What is the performance priority and what should be the conditions to prefer eac...

3

Solved

It seems as though String.Format won't format a string as an input. Am I doing something wrong, or is this just native behavior? Input : 0.37 This doesn't work. string x = String.Format("{0:P}",...
Injection asked 20/4, 2009 at 18:44

4

Solved

How do you think is really necessary to provide IFormatProvider in method String.Format(string, object) ? Is it better to write full variant String.Format(CultureInfo.CurrentCulture, "String is {...
Pancreatin asked 24/1, 2009 at 2:53

8

Solved

Duplicate from : String output: format or concat in C#? Especially in C# world using String.Format for everything is really common, normally as VB.NET developer unless I have to* I don't Str...
Ricky asked 8/12, 2008 at 14:12

2

Solved

This question is pretty much the same as this .Net question exept for java. How do you escape the %1$ characters in a java String.format? THe reason I need to do this is that I'm building up a st...
Waterfowl asked 14/10, 2008 at 14:12

32

Solved

Let's say that you want to output or concat strings. Which of the following styles do you prefer? var p = new { FirstName = "Bill", LastName = "Gates" }; Console.WriteLine("{0} {1}", p.FirstName,...
Thumping asked 19/8, 2008 at 15:46

© 2022 - 2024 — McMap. All rights reserved.