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

# CFStringGetCharacterFromInlineBuffer(_:_:)

Returns the Unicode character at a specific location in an in-line buffer.

```
func CFStringGetCharacterFromInlineBuffer(_ buf: UnsafeMutablePointer<CFStringInlineBuffer>!, _ idx: CFIndex) -> UniChar
```

## Parameters

`buf`

The initialized CFStringInlineBuffer structure in which the characters are stored. You should initialize the structure with the [`CFStringInitInlineBuffer(_:_:_:)`](/documentation/CoreFoundation/CFStringInitInlineBuffer(_:_:_:)) function.

`idx`

The location of a character in the in-line buffer `buf`. This index is relative to the range specified when `buf` was created.

## Return Value

A Unicode character, or `0` if a location outside the original range is specified.

## Discussion

This function accesses one of the characters of a string written to an in-line buffer. It is typically called from within a loop to access each character in the buffer in sequence. You should initialize the buffer with the [`CFStringInitInlineBuffer(_:_:_:)`](/documentation/CoreFoundation/CFStringInitInlineBuffer(_:_:_:)) function. The in-line buffer functions, along with the [`CFStringInlineBuffer`](/documentation/CoreFoundation/CFStringInlineBuffer) structure, give you fast access to the characters of a CFString object. The technique for in-line buffer access combines the convenience of one-at-a-time character access with the efficiency of bulk access.

---

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)