[swift-users] hasSuffix(_:) and .hasPrefix(_:) String methods missing on Linux
Alessandro Morgantini
gpz500 at technologist.com
Fri Dec 11 05:18:34 CST 2015
Hello to everyone!
I'm a very newbie to Swift, I'm doing first experiments on Linux & Mac and
I have the following issue: if I call the hasSuffix(_:) or the
hasPrefix(_:) methods on a String instance, I obtain the following error:
$ swiftc prova.swift
prova.swift:110:4: error: value of type 'String' has no member 'hasSuffix'
if pippo.hasSuffix("ao") {
^~~~~ ~~~~~~~~~
Same code works well on OS X.
I'm using Ubuntu 14.04 with required dependencies (clang and libicu-dev)
installed.
Any idea?
Cheers, Alessandro
--
Ing. Alessandro Morgantini - http://www.morgantini.org/
Email: gpz500 at technologist.com
Cell.: +39-347 761 1221 - Fax: +39-390 347 761 1221
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151211/76ca4384/attachment.html>
More information about the swift-users
mailing list