- string去掉最后一个字符
let sessionId = "this is a test"
let index = sessionId.index(sessionId.endIndex, offsetBy: -1)
// let suffix = sessionId.substring(from: index)
let suffix = sessionId.substring(to: index)
print(suffix)