Get the byte index of an UTF-8 index.

Get the byte index of an UTF-8 index. Because the letter ä consists of two UTF8 characters, the n in "Hände" has the index 2, but is actually at 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 the UTF-8 index of p inside str
str char* - base string, must be of type char* sein!
p int - Byte position in str


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

See Also

Alphabetic index HTML hierarchy of classes or Java