I am trying to compare two strings 1. String read from a.strings file using the api, String(contentsOf: localizableFilePath, encoding: .ascii).propertyListFromStringsFileFormat()
2. Strings to be written to the strings file
The string comparison fails when there are newlines in the strings, i,e
the string 1 has newLine character in them so its like "something something"
and string 2 is like "something \nsomething"
and the comparison fails because of this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.