Working with C strings in Swift, or: How to convert UnsafePointer to CString
Swift 1.1 (or perhaps earlier) has even better C string bridging: let haystack = “This is a simple string” let needle = “simple” let result = String.fromCString(strstr(haystack, needle)) The CString type is gone completely.