Skip to content

UCharArrayToWString

See Also: Array Functions, Array Variable Assignments, String Functions, Working with Arrays, StringToUCharArray, UCharArrayToString, WStringToUCharArray

Purpose

Returns a DataFlex WString which is a copy of the passed UChar array.

Return Type

WString

Syntax

UCharArrayToWString( {UCharArray} )
UCharArrayToWString( {UCharArray}[, {size} ])
UCharArrayToWString( {UCharArray}[, {size} [, {offset} ])

Parameters

  • {UCharArray}: A single dimension UChar[].
  • {size}: Limits the number of array items added to the WString (this equals the number of bytes, which is not the number of characters).
  • {offset}: Determines at which array item to start (0-based).

What it Does

UCharArrayToWString returns a DataFlex WString which is a copy of the passed single-dimension UChar array containing UTF-16 data. Note that a UTF-16 string in a UChar array uses 2 or 4 array items per character.

  • If {size} is passed, only {size} number of characters of the array are copied to the WString.
  • If {size} and {offset} are passed, only {size} number of characters of the array are copied to the WString, starting at array item {offset} (0-based).