<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFStringSetExternalCharactersNoCopy(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFStringSetExternalCharactersNoCopy"
  },
  "title" : "CFStringSetExternalCharactersNoCopy(_:_:_:_:)"
}
-->

# CFStringSetExternalCharactersNoCopy(_:_:_:_:)

Notifies a CFMutableString object that its external backing store of Unicode characters has changed.

```
func CFStringSetExternalCharactersNoCopy(_ theString: CFMutableString!, _ chars: UnsafeMutablePointer<UniChar>!, _ length: CFIndex, _ capacity: CFIndex)
```

## Parameters

`theString`

The string to act as a “wrapper” for the external backing store (`chars`). If this value is not a CFMutableString object, an assertion is raised.

`chars`

The external (client-owned) Unicode buffer acting as the backing store for `theString`.

`length`

The current length of the contents of `chars` (in Unicode characters).

`capacity`

The capacity of the Unicode buffer—that is, the total number of Unicode characters that can be stored in it before the buffer has to be grown.

## Discussion

You use this function to reallocate memory for a string, if necessary, and change its references to the data in the buffer. The object must have been created with the [`CFStringCreateMutableWithExternalCharactersNoCopy(_:_:_:_:_:)`](/documentation/CoreFoundation/CFStringCreateMutableWithExternalCharactersNoCopy(_:_:_:_:_:)) function; see the discussion of this function for more information.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)