UKismetTextLibrary::AsCurrency_Integer
Deprecated: Use AsCurrencyBase instead.
#include "Kismet/KismetTextLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Formats an integer value as currency text using the given rounding and number formatting options. The engine source marks this DEPRECATED in favor of AsCurrencyBase.
Caveats & Gotchas
- • Marked deprecated in the Blueprint node display name ('AsCurrency (integer) - DEPRECATED (use AsCurrency)') — new code should call AsCurrencyBase instead.
- • Unlike AsCurrencyBase, Value here is treated as a whole-unit amount combined with fractional digit formatting, not a smallest-fractional-unit integer, which makes the two functions easy to confuse.
- • An empty CurrencyCode falls back to the current culture's default currency, which may not be what's intended for a specific in-game store price.
Signature
static FText AsCurrency_Integer(int32 Value, TEnumAsByte<ERoundingMode> RoundingMode, bool bAlwaysSign = false, bool bUseGrouping = true, int32 MinimumIntegralDigits = 1, int32 MaximumIntegralDigits = 324, int32 MinimumFractionalDigits = 0, int32 MaximumFractionalDigits = 3, const FString& CurrencyCode = TEXT("")); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Value | int32 | The integer amount to format as currency. | — |
| RoundingMode | TEnumAsByte<ERoundingMode> | How fractional digits beyond the maximum should be rounded. | — |
| bAlwaysSign | bool | Whether to always show a sign (+/-), even for positive values. | false |
| bUseGrouping | bool | Whether to insert culture-appropriate thousands separators. | true |
| MinimumIntegralDigits | int32 | Minimum number of integer digits to display. | 1 |
| MaximumIntegralDigits | int32 | Maximum number of integer digits to display. | 324 |
| MinimumFractionalDigits | int32 | Minimum number of fractional digits to display. | 0 |
| MaximumFractionalDigits | int32 | Maximum number of fractional digits to display before rounding. | 3 |
| CurrencyCode | const FString& | ISO 4217 currency code to use for symbol/formatting rules. | TEXT("") |
Return Type
FText Example
Format an integer price (legacy path) C++
FText PriceText = UKismetTextLibrary::AsCurrency_Integer(6, ERoundingMode::HalfToEven, false, true, 1, 324, 0, 2, TEXT("USD")); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?