> On Jun 2, 2016, at 1:07 PM, John Myers via swift-users > <[email protected]> wrote: > > 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!
Have you compared characters.count on the two strings? Could you be pulling in \r\n? -- E _______________________________________________ swift-users mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-users
