FGenericPlatformString::Convert

Converts the [Src, Src+SrcSize) string range from SourceEncoding to DestEncoding and writes it to the [Dest, Dest+DestSize) range.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformString.h

Include

#include "GenericPlatform/GenericPlatformString.h"

Syntax

template<typename SourceEncoding, typename DestEncoding>
static TEnableIf< !TAreEncodingsCompatible< SourceEncoding, DestEncoding >::Value &&TIsFixedWidthEncoding< SourceEncoding >::Value, DestEncoding * >::Type Convert
(
    DestEncoding * Dest,
    int32 DestSize,
    const SourceEncoding * Src,
    int32 SrcSize,
    DestEncoding BogusChar
)

Remarks

Converts the [Src, Src+SrcSize) string range from SourceEncoding to DestEncoding and writes it to the [Dest, Dest+DestSize) range. The Src range should contain a null terminator if a null terminator is required in the output. If the Dest range is not big enough to hold the converted output, NULL is returned. In this case, nothing should be assumed about the contents of Dest.

Returns

A pointer to one past the last-written element.

Parameters

Parameter

Description

Dest

The start of the destination buffer.

DestSize

The size of the destination buffer.

Src

The start of the string to convert.

SrcSize

The number of Src elements to convert.

BogusChar

The char to use when the conversion process encounters a character it cannot convert.

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