TCString::Strncpy

Copy a string with length checking. Behavior differs from strncpy in that last character is zeroed.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/CString.h

Include

#include "Misc/CString.h"

Syntax

static CharType * Strncpy
(
    CharType * Dest,
    const CharType * Src,
    int32 MaxLen
)

Remarks

Copy a string with length checking. Behavior differs from strncpy in that last character is zeroed.

Returns

pointer to resulting string buffer

Parameters

Parameter

Description

Dest

destination buffer to copy to

Src

source buffer to copy from

MaxLen

max length of the buffer (including null-terminator)

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