---
title: "JSStringGetCharactersPtr(_:)"
framework: javascriptcore
role: symbol
role_heading: Function
path: "javascriptcore/jsstringgetcharactersptr(_:)"
---

# JSStringGetCharactersPtr(_:)

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

## Declaration

```swift
func JSStringGetCharactersPtr(_ string: JSStringRef!) -> UnsafePointer<JSChar>!
```

## Parameters

- `string`: The doc://com.apple.javascriptcore/documentation/JavaScriptCore/JSStringRef with the backing store you want to access.

## Return Value

Return Value A pointer to the Unicode character buffer that serves as the backing store of string, which the system deallocates when it deallocates string.

## See Also

### Accessing JavaScript String Information

- [JSStringGetLength(_:)](javascriptcore/jsstringgetlength(_:).md)
- [JSStringGetMaximumUTF8CStringSize(_:)](javascriptcore/jsstringgetmaximumutf8cstringsize(_:).md)
- [JSStringGetUTF8CString(_:_:_:)](javascriptcore/jsstringgetutf8cstring(_:_:_:).md)
