JSStringRef.h

A UTF16 character buffer that is the fundamental string representation in JavaScript.

Topics

Functions

JSStringCreateWithCharacters

Creates a JavaScript string from a buffer of Unicode characters.

JSStringCreateWithUTF8CString

Creates a JavaScript string from a null-terminated UTF8 string.

JSStringGetCharactersPtr

Returns a pointer to the Unicode character buffer that serves as the backing store for a JavaScript string.

JSStringGetLength

Returns the number of Unicode characters in a JavaScript string.

JSStringGetMaximumUTF8CStringSize

Returns the maximum number of bytes a JavaScript string will take up if converted into a null-terminated UTF8 string.

JSStringGetUTF8CString

Converts a JavaScript string into a null-terminated UTF8 string, and copies the result into an external byte buffer.

JSStringIsEqual

Tests whether two JavaScript strings match.

JSStringIsEqualToUTF8CString

Tests whether a JavaScript string matches a null-terminated UTF8 string.

JSStringRelease

Releases a JavaScript string.

JSStringRetain

Retains a JavaScript string.

Data Types

See the Overview section above for header-level documentation.

JSChar

A Unicode character.

See Also

Legacy JavaScriptCore APIs

JSBase.h

Defines the JavaScriptCore interface engine.

JSObjectRef.h

A JavaScript Object.

JSStringRefCF.h

Contains CFString convenience methods.

JSValueRef.h

A JavaScript value that is the base type for all JavaScript values and the polymorphic functions on them.