CharToValueW
This function converts a string to Unicode character codes, combines each two codes into a double-byte word, and then stores those values in an integer array.
Function | Group | Execution | Windows | Embedded | Thin Client | Mobile Access |
---|---|---|---|---|---|---|
CharToValueW | String | Synchronous | Supported | Supported | Supported | Not supported |
Syntax
- tagString
- The name of the string tag, whose value will be converted.
Note: The tag name should be enclosed in quotes, as shown in the syntax diagram, or else the function will try to use the value of the tag.
- tagArray
- The name of the integer array that will receive the converted values. If no array index is specfied, then the default is 0.
Note: The tag name should be enclosed in quotes, as shown in the syntax diagram, or else the function will try to use the value of the tag.
Returned value
Returns the number of array elements used, which should be equal to half the number of characters in the string.
Notes
Because of how each two character codes are combined into single value, this function only supports Unicode character codes 0 through 255. For character codes greater than 255, or when double-byte words are not needed, use the CharToValue function.
Examples
If StrTag = “Studio”, then Array[0] = 29779 (“St”), Array[1] = 25717 (“ud”), and Array[2] = 28521 (“io”):
CharToValue( "StrTag", "Array" )
If StrTag = “Studio”, then Array[10] = 29779 (“St”), Array[11] = 25717 (“ud”), and Array[12] = 28521 (“io”):
CharToValue( "StrTag", "Array[10]" )