08-04-2021, 06:39 PM
QM string encoding is UTF8. It means variable-length characters. Some characters are 1 byte, some 2, 3 or 4 (rarely).
When you know character length, simply use it in code.
Macro Macro3017
In other cases usually you use find or findrx or similar function to find a substring, and it gives correct result.
When you know character length, simply use it in code.
Macro Macro3017
str s="ąbc" ;;first character is 2 bytes
str bad.left(s 1) ;;gets half of character
out bad
str good.left(s 2)
out good
In other cases usually you use find or findrx or similar function to find a substring, and it gives correct result.