<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">There’s a FIXME and a radar (18878343) in the source for StringLegacy:<div class=""><br class=""></div><div class=""><a href="https://github.com/apple/swift/blob/master/stdlib/public/core/StringLegacy.swift#L98" class="">https://github.com/apple/swift/blob/master/stdlib/public/core/StringLegacy.swift#L98</a><br class=""><div><br class=""></div><div>Can the information be re-created as a SwiftBug instead? </div><div><br class=""></div><div>Alex</div><div><br class=""><blockquote type="cite" class=""><div class="">Begin forwarded message:</div><br class="Apple-interchange-newline"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">From: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">Alex Blewitt <alex.blewitt@gmail.com><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Subject: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><b class="">Re: [swift-users] hasSuffix(_:) and .hasPrefix(_:) String methods missing on Linux</b><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Date: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">11 December 2015 11:48:02 GMT<br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">To: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">Alessandro Morgantini <gpz500@technologist.com><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Cc: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">swift-users@swift.org<br class=""></span></div><br class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">They may come as extensions from NSString, which Swift doesn’t have fully implemented on Linux yet.<div class=""><br class=""></div><div class="">Alex</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 11 Dec 2015, at 11:18, Alessandro Morgantini via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class="">Hello to everyone!<br class=""></div>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:<br class=""><br class=""><div style="margin-left:40px" class="">$ swiftc prova.swift<br class="">prova.swift:110:4: error: value of type 'String' has no member 'hasSuffix'<br class="">if pippo.hasSuffix("ao") {<br class=""> ^~~~~ ~~~~~~~~~<br class=""></div><br class=""></div>Same code works well on OS X.<br class=""></div>I'm using Ubuntu 14.04 with required dependencies (clang and libicu-dev) installed.<br class=""></div>Any idea?<br class=""><br class=""></div>Cheers, Alessandro<br clear="all" class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><br class="">-- <br class=""><div class="gmail_signature">Ing. Alessandro Morgantini - <a href="http://www.morgantini.org/" target="_blank" class="">http://www.morgantini.org/</a><br class="">Email: <a href="mailto:gpz500@technologist.com" target="_blank" class="">gpz500@technologist.com</a><br class="">Cell.: +39-347 761 1221 - Fax: +39-390 347 761 1221</div>
</div></div></div></div></div></div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=4UsVFgIJDmjEl1-2Bp4dkDdfPyHFijFe3gbZsM1qGcraVVqTtvGFDuzZdI74U2KtedTG81HrpqxUOZZlD6f7Xs3DTxUtOKkwoJxGudabJubIMOGkmj3R-2FcyR1ozB0pKqAi43a4KC2Sx0eXISjkxDcxcG6hAfETVL6RIFqubhgHQtmJXMmgl1XAwyg2ZdMuEwZGIqJTzKJE8jP2absyTIOVfoLGbI2IzcYza1T-2F7fIS-2Fcw-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>