[swift-corelibs-dev] error: value of type 'NSMutableData' has no member 'rangeOfData'

Rajat Talwar cuterajat26 at gmail.com
Thu Jan 14 22:32:46 CST 2016

Hello devs,

I am new to swift on linux, am facing compilation issue  on this code saying 'NSMutableData' has no member ‘rangeOfData'

import Foundation

let buffer = NSMutableData(capacity: 200)
let delim:NSString = "\n"

buffer!.rangeOfData(delim.dataUsingEncoding(NSUTF8StringEncoding)!, options: [], range: NSMakeRange(0, buffer!.length))

I am using swift-2.2-SNAPSHOT-2016-01-11-a-ubuntu15.10

Any help or info is highly appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20160115/6f50d47f/attachment.html>

More information about the swift-corelibs-dev mailing list