Docs Menu
- Introduction to Syncloop
- Quick Start Syncloop
-
API Developer Guide
-
middleware
-
pub
- adapter
- authorization
- client
- collection
- date
- docList
- file
- graphQL
- io
- json
- jwt
- math
- platform
- security
- server
- service
- specs
- sql
- string
- bytesToHexString
- bytesToString
- compare
- compareStrings
- concat
- decodeBase64
- decodeHTML
- encodeBase64
- encodeHTML
- equals
- equalsIgnoreCase
- escapeSQL
- fromXML
- htmlDecode
- htmlEncode
- indexOf
- isAlphanumeric
- isBlank
- isDate
- isEmpty
- isNumber
- length
- lookupDict
- maskString
- messageDigest
- messageFormat
- NullOrWhiteSpc
- objectToString
- padLeft
- replace
- rightPad
- stringConcat
- stringIndexOf
- stringToBytes
- subString
- TextArrayToTextString
- TextListCollector
- tokenize
- toLower
- toString
- toUpper
- trim
- urlDecode
- tenant
- util
- xml
-
pub
-
middleware
- User Guide
- FAQs
- Java Docs
- Blogs
API Developer Guide / middleware / pub / util / format / formatCurrency
Service: formatCurrency
This service is responsible for formatting a numerical value as a currency, including options for specifying the number of decimal places, the locale, and the currency symbol.
Input Parameter:
Name | Type | Description |
number: | Number | The numerical value to be formatted as currency. |
decimalPlaces: | Integer | The number of decimal places to include in the formatted currency value. |
locale: | String | An optional parameter specifying the locale or region-specific formatting rules for currency. For example, "en_US" for US English formatting. |
symbol: | String | An optional parameter specifying the currency symbol to be used. For example, "$" for US dollars. |
Output Parameter:
Name | Type | Description |
result: | String | The formatted currency value as a string. |