getCurrencySymbol
检索给定货币代码的货币符号。
Retrieves the currency symbol for a given currency code.
getCurrencySymbol(code: string, format: "wide" | "narrow", locale: string = 'en'): string
参数
返回值
符号,或货币代码(如果没有可用的符号)。
string: The symbol, or the currency code if no symbol is available.
参见
说明
例如,对于默认 en-US 语言环境,代码 USD 可以由窄符号 $ 或宽符号 US$ 表示。
For example, for the default en-US locale, the code USD can be represented by the narrow symbol $ or the wide symbol US$.