copyEncoded

Copies text from source to buff performing conversion to different unicode transformation format if needed.

buff must be large enough to hold the result.

Preconditions: buff.length >= minLength!To(source)

@safe @trusted
To[]
copyEncoded
(
To
From
)
(
in From[] source
,
To[] buff
)
if (
isSomeChar!To &&
isSomeChar!From
)

Return Value

Type: To[]

Slice of the provided buffer buff with the copy of source.

Examples

t
{
	const str = "abc-ЭЮЯ";
	wchar[100] wsbuff;
	assert(copyEncoded(str, wsbuff) == "abc-ЭЮЯ"w

Meta