Add formatNumber function
See original GitHub issueThe function will have following signature
public static String formatNumber(long number)
public static String formatNumber(long number, NumberFormatOptions options)
Test cases it should pass:
formatNumber(1000) // "1,000"
formatNumber(1000, NumberFormatOptions(2)) // "1000.00"
formatNumber(1000.754,NumberFormatOptions(0, "," , ".")) // "1.001"
formatNumber(1000000.754, NumberFormatIOptions(2, "," , ".")) // "1.000.000,75"
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
FormatNumber Function - Microsoft Support
Formats the number values in "Discount" field into "Number" format with 2 decimal points, all less than 1 values will have "0" before...
Read more >Power Automate: formatNumber function - Manuel T. Gomes
How to use the Power Automate “formatNumber "function? First, I'll explore the basics, tips, and tricks on using it efficiently in your ...
Read more >VBScript FormatNumber Function - W3Schools
The FormatNumber function returns an expression formatted as a number. Syntax. FormatNumber(Expression[,NumDigAfterDec[, IncLeadingDig[,UseParForNegNum[, ...
Read more >FormatNumber Function - ADM Help Centers
Returns an expression formatted as a number. FormatNumber(Expression [,NumDigitsAfterDecimal [,IncludeLeadingDigit [,UseParensForNegativeNumbers ...
Read more >FormatNumber - The AMPscript Guide
This function formats a string as a number. Format patterns follow the C# format types outlined in the official Microsoft documentation:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please specify formatNumber(1000) //“1,000” what about formatNumber(100000)=? and formatNumber(10000000)=? Also for formatOptions( ) NumberFormatOptions? please give more test cases?
@ssshailesh28 @flube2 please submit the PR. I am not again PR. The point is we all discuss what should the function do.