---
title: withCStringNoCopy
framework: kernel
role: pseudoSymbol
path: kernel/ossymbol/1808179-withcstringnocopy
---

# withCStringNoCopy

Returns an OSSymbol created from a C string, without copying that string, or the existing unique instance of the same value.

## Declaration

```occ
static const OSSymbol * withCStringNoCopy(
 const char *cString); 
```

## Parameters

- `cString`: The C string to look up or use.

## Return Value

Return Value An instance of OSSymbol representing the same characters as cString; NULL.

## Overview

Overview Avoid using this function; OSSymbols should own their internal string buffers. This function returns the unique OSSymbol instance representing the string value of cString. You can compare it with other OSSymbols using the == operator. OSSymbols are reference-counted normally. This function either returns a new OSSymbol with a retain count of 1, or increments the retain count of the existing instance.

## See Also

### Miscellaneous

- [free](kernel/ossymbol/1808021-free.md)
- [initWithCString](kernel/ossymbol/1808026-initwithcstring.md)
- [initWithCStringNoCopy](kernel/ossymbol/1808036-initwithcstringnocopy.md)
- [initWithString](kernel/ossymbol/1808054-initwithstring.md)
- [isEqualTo](kernel/ossymbol/1808078-isequalto.md)
- [isEqualTo(const char *)](kernel/ossymbol/1808093-isequalto.md)
- [isEqualTo(const OSSymbol *)](kernel/ossymbol/1808114-isequalto.md)
- [taggedRelease(const void *)](kernel/ossymbol/1808137-taggedrelease.md)
- [taggedRelease(const void *, const int)](kernel/ossymbol/1808154-taggedrelease.md)
- [withCString](kernel/ossymbol/1808171-withcstring.md)
- [withString](kernel/ossymbol/1808192-withstring.md)
