FString::SanitizeFloat

Syntax

static FString SanitizeFloat
(
    double InFloat,
    const int32 InMinFractionalDigits
)

Remarks

Converts a float string with the trailing zeros stripped For example - 1.234 will be "1.234" rather than "1.234000"

Returns

sanitized string version of float

Parameters

Parameter

Description

InFloat

The float to sanitize

InMinFractionalDigits

The minimum number of fractional digits the number should have (will be padded with zero)

References

Module

Core

Header

Runtime/Core/Public/Containers/UnrealString.h

Source

Runtime/Core/Private/Containers/String.cpp