Closed iceboxi closed 5 years ago
fix unicode string count issue for example, input string as
let test = """ -----BEGIN PUBLIC KEY-----\r\ntest\r\n-----END PUBLIC KEY----- """
test.count will be 56 in this case, regExp.stringByReplacingMatches result will be
test-----ENDPUBLICKEY-----
but correct count should be test.lengthOfBytes(using: .utf8) = 58 and regExp.stringByReplacingMatches result will be
test
Thanks @iceboxi , PR has been merged.
Cheers, Thanh Nguyen
fix unicode string count issue for example, input string as
test.count will be 56 in this case, regExp.stringByReplacingMatches result will be
but correct count should be test.lengthOfBytes(using: .utf8) = 58 and regExp.stringByReplacingMatches result will be