nw::os::AllocateAndCopyString Function

Syntax

template <typename TChar>
TChar * AllocateAndCopyString(
     const TChar * str,
     os::IAllocator * allocator,
     size_t maxSize
);

Template Arguments

Name Description
TChar Character type.

Arguments

Name Description
in str String to copy.
in allocator Memory allocator.
in maxSize Maximum number of characters to use as a limit during copies.

Return Values

Returns the copied string.

Description

Allocates only the required amount of memory, and copies a string into the allocated region.


CONFIDENTIAL