FString::SanitizeFloat

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

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Containers/UnrealString.h

Include

#include "Containers/UnrealString.h"

Source

/Engine/Source/Runtime/Core/Private/Containers/String.cpp

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)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss