---
title: "CFStringCreateByCombiningStrings(_:_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfstringcreatebycombiningstrings(_:_:_:)"
---

# CFStringCreateByCombiningStrings(_:_:_:)

Creates a single string from the individual CFString objects that comprise the elements of an array.

## Declaration

```swift
func CFStringCreateByCombiningStrings(_ alloc: CFAllocator!, _ theArray: CFArray!, _ separatorString: CFString!) -> CFString!
```

## Parameters

- `alloc`: The allocator to use to allocate memory for the new string. Pass NULL or doc://com.apple.corefoundation/documentation/CoreFoundation/kCFAllocatorDefault to use the current default allocator.
- `theArray`: An array of CFString objects to concatenate. This value should not be NULL.
- `separatorString`: The string to insert between the substrings in the returned string. This value is commonly a whitespace character such as a tab or a newline (carriage return). If this value is not a valid CFString object, an assertion is raised.

## Return Value

Return Value A string that contains a concatenation of the strings in theArray separated by separatorString. The order of the substrings in the string is identical to the order of the elements in theArray.

## Discussion

Discussion If theArray is empty, returns an empty CFString object; if theArray contains one CFString object, that object is returned (without the separator string). Returns NULL if there was a problem in creating the string. Ownership follows the The Create Rule. Discussion See also CFStringCreateArrayBySeparatingStrings(_:_:_:).

## See Also

### Creating a CFString

- [CFStringCreateArrayBySeparatingStrings(_:_:_:)](corefoundation/cfstringcreatearraybyseparatingstrings(_:_:_:).md)
- [CFStringCreateCopy(_:_:)](corefoundation/cfstringcreatecopy(_:_:).md)
- [CFStringCreateFromExternalRepresentation(_:_:_:)](corefoundation/cfstringcreatefromexternalrepresentation(_:_:_:).md)
- [CFStringCreateWithBytes(_:_:_:_:_:)](corefoundation/cfstringcreatewithbytes(_:_:_:_:_:).md)
- [CFStringCreateWithBytesNoCopy(_:_:_:_:_:_:)](corefoundation/cfstringcreatewithbytesnocopy(_:_:_:_:_:_:).md)
- [CFStringCreateWithCharacters(_:_:_:)](corefoundation/cfstringcreatewithcharacters(_:_:_:).md)
- [CFStringCreateWithCharactersNoCopy(_:_:_:_:)](corefoundation/cfstringcreatewithcharactersnocopy(_:_:_:_:).md)
- [CFStringCreateWithCString(_:_:_:)](corefoundation/cfstringcreatewithcstring(_:_:_:).md)
- [CFStringCreateWithCStringNoCopy(_:_:_:_:)](corefoundation/cfstringcreatewithcstringnocopy(_:_:_:_:).md)
- [CFStringCreateWithFormatAndArguments(_:_:_:_:)](corefoundation/cfstringcreatewithformatandarguments(_:_:_:_:).md)
- [CFStringCreateWithPascalString(_:_:_:)](corefoundation/cfstringcreatewithpascalstring(_:_:_:).md)
- [CFStringCreateWithPascalStringNoCopy(_:_:_:_:)](corefoundation/cfstringcreatewithpascalstringnocopy(_:_:_:_:).md)
- [CFStringCreateWithSubstring(_:_:_:)](corefoundation/cfstringcreatewithsubstring(_:_:_:).md)
