Get the byte index of an UTF-8 index.

Get the byte index of an UTF-8 index. In the string "Hände" the letter n has the (UTF-8) index 2, but, since ä consists of two UTF8 characters, the "real" byte index 3.

Please note that actually only char* strings are allowed as input here. In order not to falsify the result of the function, the function intentionally does not do any automatic conversions. To get the char* content of a string please use string::get.

Name Type Default Description
Return int   Byte index of p inside str
str char* - base string, must be of type char* sein!
p int - UTF-8 position in str

Since
v3.3

Available
priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator

See Also
get_utf8index

Alphabetic index HTML hierarchy of classes or Java