Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

NPString

« Gecko Plugin API Reference « Scripting plugins

Summary

NPString is a struct that holds a pointer to a sequence of 8-bit units (NPUTF8) making up a UTF-8 string, and the number of 8-bit units in the UTF-8 string.

Note: Whenever an NPString owns its string data and the data may be released through a call to NPN_ReleaseVariantValue(), the string data must be allocated using NPN_MemAlloc().

Syntax

typedef struct _NPString {
    const NPUTF8 *UTF8Characters;
    uint32_t UTF8Length;
} NPString;

Fields

The data structure has the following fields:

UTF8Characters
An array of the UTF-8 characters comprising the string.
UTF8Length
The number of bytes in the UTF-8 string (not the number of characters).

Document Tags and Contributors

Tags: 
 Contributors to this page: teoli, Eric johansson, Sheppy
 Last updated by: Eric johansson,