---
title: getCStringNoCopy
framework: Kernel
role: symbol
role_heading: Instance Method
platforms: [driverkit 19.0+, macOS 10.15+]
path: kernel/osstring/3180974-getcstringnocopy
---

# getCStringNoCopy

Returns a pointer to the OSString object's internal data buffer.

## Declaration

```occ
const char * getCStringNoCopy(void);
```

```occ
virtual const char * getCStringNoCopy(void);
```

## Return Value

Return Value A pointer to the string or NULL if the OSString has zero length. The string will be null terminated.

## See Also

### Getting a C String

- [OSStringPtr](driverkit/osstringptr.md)
