swift截断String末尾字符

CSDN越来越不好用了,登录要老半天,发表博客总是提示要重新登录!

swift截断String 末尾字符可以这样做:

var sb =  Strings.empty
for Id in iSelected.keys{
      sb = sb + Id + ","
}
if(!sb.isEmpty){
    return (sb as NSString).substringToIndex(count(sb) - 1 )
}

你可能感兴趣的:(swift)