mirror of
https://github.com/passepartoutvpn/wireguard-apple.git
synced 2025-02-19 06:12:01 +00:00
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> |
||
---|---|---|
.. | ||
Logging | ||
Model | ||
FileManager+Extension.swift | ||
Keychain.swift |