wireguard-apple/WireGuard/Shared
Jason A. Donenfeld bb5760cca4 WgQuickConfig: Swift treats \r\n as a single character
let blah = "hello\nworld\ndoes\nthis\nwork"
print(blah.split(separator: "\n"))
//output: ["hello", "world", "does", "this", "work"]

let blah2 = "hello\r\nworld\r\ndoes\r\nthis\r\nwork"
print(blah2.split(separator: "\n"))
//output: ["hello\r\nworld\r\ndoes\r\nthis\r\nwork"]
//expected: ["hello\r", "world\r", "does\r", "this\r", "work\r"]

In blah2, the string splitting fails because swift considers \r\n to be
its own character.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-06-28 12:26:39 +02:00
..
Logging Log view: Don't use a global array to store log entries 2019-04-10 17:57:36 +05:30
Model WgQuickConfig: Swift treats \r\n as a single character 2019-06-28 12:26:39 +02:00
FileManager+Extension.swift ringlogger: support mpsc for singlefile 2019-03-17 08:51:27 +01:00
Keychain.swift Keychain: store configurations in keychain instead of providerConfig 2019-02-06 06:20:23 +01:00