Currency String Format

Hello Guys,

I want to display my number(stored as string ) as currency.

float numFloat=12314143253453454;
string numStr="12314143253453454";

//This one prints correct
Debug.Log (String.Format("Order Total: {0:C}", numFloat));


//This one doesnt
Debug.Log (String.Format("Order Total: {0:C}", numStr));

I have even tried CultureInfo , but all that works if the number is int/float/long etc (not string).

So is there a way to achieve this when my number is stored as STRING(i have very large numbers say 100 digit) ?

You could try this.

Debug.Log (String.Format("Order Total: {0:C}", float.Parse(numStr)));

this will parse your string to a float.