-

GET_WCHAR

Type Function
Description Extracts one character out of a string of a variable of the data type WSTRING. The string from which the character is to be extracted is applied to the IN input. The number of the character to be extracted is specified at the N input. The output value represents the number of the character in ASCII 256 or UTF-8 code (observe the following notes).
Notes
  • If IN > 0 (string length > 0) and N <= IN, the function returns the ASCII or UTF-8 code number of the extracted character.
  • If the above condition is not true, the function returns the value 0 (see also the error behavior below).
  • Characters represented by four bytes: Some characters have four bytes though but only the double byte at a 2-byte oriented position will be returned. Therefore the position of a specific character moves if four byte characters are part of the string.
Parameters Inputs

IN

N

Output

OUT
Error behavior Error behavior
Additional information EN/ENO behavior
ExampleExample in ST