tidwall / SwiftWebSocket

Fast Websockets in Swift for iOS and OSX
MIT License
1.53k stars 244 forks source link

Substring Method Deprecated -- WebSocket.Swift #126

Open strikerEng opened 6 years ago

strikerEng commented 6 years ago

The substring method in the WebSocket needs to be corrected to adhere to the new Swift 4 changes. Lines 1147-1148 to be exact. The correct code is as follows: key = trim(String(line[..<r.lowerBound])) value = trim(String(line[r.upperBound...]))