Get the net weight string of a given string.

Get the net weight string of a given string. Net weight strings are calculated as follows:

Name Type Default Description
Return char*   result is returned as result
result String or char* - allocated string for the net weight string
str String or char* - base string
convertUniTags int 0 Auto replace Unicode tags of form <0x200B>?

0 : No
Otherwise : Yes
replaceTypos int 0 Replace quotes, blanks and hyphens by unique letters?

0 : No
Otherwise : Yes
replaceHTMLEntities int 0 [Since v5.0 R37000] Should HTML entities be replaced by their UTF-8 letters?

0 : No
Otherwise : Yes. All HTML entities of the forms span[ddd src]{&auml;}, &#228; and &#xE4; are replaced by their Unicode letters (in this case ä).

Here are some results of get_netweight_str with the input string "--Hallo <0x275D>Hällo<0x275E>--". The same results you will also get with the uncoded input string "--Hallo Hällo❞--".

0, 0 --Hallo <0x275D>H<0x00E4>llo<0x275E>--
0, 1 --Hallo "H<0x00E4>llo&"--
1, 0 --Hallo Hällo--
1, 1 --Hallo "Hällo"--

Since
v3.3.1 R3810, 28. May 2013
v5.0 R36940, 8. Juli 2025: result and str are also allowed to be of type String.
Parameter replaceHTMLEntities seit v5.0 R37000

Available
priint:comet InDesign® Plug-Ins, comet_pdf

See Also
comet.strutils.getNetWeight

Alphabetic index HTML hierarchy of classes or Java