FMath::FormatIntToHumanReadable are forgotting (1) the 3rd comma pattern for a positive value and (2) a negative value support

repro:

Run the code:

UE_LOG( LogTemp, Log, TEXT( "int32 max={%s}" ), *FMath::FormatIntToHumanReadable( std::numeric_limits<int32>::max() ) );
UE_LOG( LogTemp, Log, TEXT( "int32 min={%s}" ), *FMath::FormatIntToHumanReadable( std::numeric_limits<int32>::min() ) );

Expected result:

[2017.11.22-06.35.46:964][  1]LogTemp: int32 max={2,147,483,647}
[2017.11.22-06.35.46:965][  1]LogTemp: int32 min={-2,147,483,648}

Actual result:

[2017.11.22-06.35.46:964][  1]LogTemp: int32 max={2147,483,647}
[2017.11.22-06.35.46:965][  1]LogTemp: int32 min={-2147483648}

Current documentation:

/**
 * Formats an integer value into a human readable string (i.e. 12345 becomes "12,345")
 *
 * @param	Val		The value to use
 * @return	FString	The human readable string
 */

Proposal to fix: (Either)

a. Support the 3rd comma pattern and a negative value pattern.

b. Rewrite the document to fit a current implementation limitation.

References:

  1. Header: https://github.com/EpicGames/UnrealEngine/blob/4.18/Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h#L1322
  2. Source: https://github.com/EpicGames/UnrealEngine/blob/4.18/Engine/Source/Runtime/Core/Private/Math/UnrealMath.cpp#L2768

https://github.com/EpicGames/UnrealEngine/pull/4277