---
title: "CFStringGetCharacterFromInlineBuffer(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfstringgetcharacterfrominlinebuffer(_:_:)"
---

# CFStringGetCharacterFromInlineBuffer(_:_:)

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

## Declaration

```swift
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 doc://com.apple.corefoundation/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

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

## Discussion

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(_:_:_:) function. The in-line buffer functions, along with the 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.

## See Also

### Accessing Characters

- [CFStringCreateExternalRepresentation(_:_:_:_:)](corefoundation/cfstringcreateexternalrepresentation(_:_:_:_:).md)
- [CFStringGetBytes(_:_:_:_:_:_:_:_:)](corefoundation/cfstringgetbytes(_:_:_:_:_:_:_:_:).md)
- [CFStringGetCharacterAtIndex(_:_:)](corefoundation/cfstringgetcharacteratindex(_:_:).md)
- [CFStringGetCharacters(_:_:_:)](corefoundation/cfstringgetcharacters(_:_:_:).md)
- [CFStringGetCharactersPtr(_:)](corefoundation/cfstringgetcharactersptr(_:).md)
- [CFStringGetCString(_:_:_:_:)](corefoundation/cfstringgetcstring(_:_:_:_:).md)
- [CFStringGetCStringPtr(_:_:)](corefoundation/cfstringgetcstringptr(_:_:).md)
- [CFStringGetLength(_:)](corefoundation/cfstringgetlength(_:).md)
- [CFStringGetPascalString(_:_:_:_:)](corefoundation/cfstringgetpascalstring(_:_:_:_:).md)
- [CFStringGetPascalStringPtr(_:_:)](corefoundation/cfstringgetpascalstringptr(_:_:).md)
- [CFStringGetRangeOfComposedCharactersAtIndex(_:_:)](corefoundation/cfstringgetrangeofcomposedcharactersatindex(_:_:).md)
- [CFStringInitInlineBuffer(_:_:_:)](corefoundation/cfstringinitinlinebuffer(_:_:_:).md)
