---
title: "xpc_string_get_string_ptr(_:)"
framework: xpc
role: symbol
role_heading: Function
path: "xpc/xpc_string_get_string_ptr(_:)"
---

# xpc_string_get_string_ptr(_:)

Returns a pointer to the internal storage of a string object.

## Declaration

```swift
func xpc_string_get_string_ptr(_ xstring: xpc_object_t) -> UnsafePointer<CChar>?
```

## Parameters

- `xstring`: The string object which is to be examined.

## Return Value

Return Value A pointer to the string object’s internal storage.

## See Also

### String objects

- [xpc_string_create(_:)](xpc/xpc_string_create(_:).md)
- [xpc_string_create_with_format_and_arguments(_:_:)](xpc/xpc_string_create_with_format_and_arguments(_:_:).md)
- [xpc_string_get_length(_:)](xpc/xpc_string_get_length(_:).md)
