Skip to content

StringToUCharArray

See Also: - Array Functions - Array Variable Assignments - String Functions - Working with Arrays - UCharArrayToString - UCharToWString - WStringToUCharArray

Purpose

Copies an entire DataFlex String to a UChar array.

Return Type

UChar[]

Syntax

StringToUCharArray({StringValue})

Where:

  • {StringValue} is the DataFlex string to convert.

What it Does

StringToUCharArray copies an entire DataFlex String to a UChar array. The SizeOfArray of the UChar array will be the string's Length.

Example

This sample copies the DataFlex string sValue to the UChar array uaMyString.

Procedure Test
    UChar[] uaMyString
    String sValue
    Move "This is a test" to sValue
    Move (StringToUCharArray(sValue)) to uaMyString
End_Procedure