StringEncode.convert

Converts a string in one encoding type to another (as specified by the class' template parameters).

Makes a guess at the required size of output buffer, simply setting it to the same size as the input buffer. Then repeatedly tries converting the input and increasing the size of the output buffer until the conversion succeeds.

To avoid repeated memory allocation, if you need to call this function many times, it's best to always pass the same output buffer.

class StringEncode(istring fromcode, istring tocode)
override
void
convert

Parameters

input cstring

the array of characters to be converted.

output mstring

array of characters which will be filled with the results of the conversion. The output array is resized to fit the results.

Meta