UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FastDecimalFormat Namespace Reference

Namespaces

namespace  Internal
 

Functions

const FDecimalNumberFormattingRulesGetCultureAgnosticFormattingRules ()
 
uint64 Pow10 (const int32 InExponent)
 
template<typename T >
void NumberToString (const T InVal, const FDecimalNumberFormattingRules &InFormattingRules, const FNumberFormattingOptions &InFormattingOptions, FString &OutString)
 
template<typename T >
FString NumberToString (const T InVal, const FDecimalNumberFormattingRules &InFormattingRules, const FNumberFormattingOptions &InFormattingOptions)
 

Detailed Description

Provides efficient and culture aware number formatting and parsing. You would call FastDecimalFormat::NumberToString to convert a number to the correct decimal representation based on the given formatting rules and options. You would call FastDecimalFormat::StringToNumber to convert a string containing a culture correct decimal representation of a number into an actual number. The primary consumer of this is FText, however you can use it for other things. GetCultureAgnosticFormattingRules can provide formatting rules for cases where you don't care about culture.

Note
If you use the version of FastDecimalFormat::NumberToString that takes an output string, the formatted number will be appended to the existing contents of the string.

Function Documentation

◆ GetCultureAgnosticFormattingRules()

CORE_API const FDecimalNumberFormattingRules & FastDecimalFormat::GetCultureAgnosticFormattingRules ( )

Get the formatting rules to use when you don't care about culture.

◆ NumberToString() [1/2]

template<typename T >
FString FastDecimalFormat::NumberToString ( const T  InVal,
const FDecimalNumberFormattingRules InFormattingRules,
const FNumberFormattingOptions InFormattingOptions 
)
inline

◆ NumberToString() [2/2]

template<typename T >
void FastDecimalFormat::NumberToString ( const T  InVal,
const FDecimalNumberFormattingRules InFormattingRules,
const FNumberFormattingOptions InFormattingOptions,
FString &  OutString 
)
inline

◆ Pow10()

CORE_API uint64 FastDecimalFormat::Pow10 ( const int32  InExponent)

Return the value of 10^exp for the given exponent value.

Note
The maximum exponent supported is 10^18.