[swift-users] String Comparisons in Swift

John Myers myersj at shawanoschools.com
Thu Jun 2 14:07:38 CDT 2016


I've had some difficulty comparing string variables to string constants
with ==.  I believe it's always after using a readLine().  Does Swift
require a .equals() or a .compareTo(), as other c like languages, or are
there invisible characters in my string because of the readLine() which I
need to strip out?
Thanks!
-- 
John Myers
------------------------------------------------------------------
myersj at shawanoschools.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160602/8af10e7d/attachment.html>


More information about the swift-users mailing list