Swift の string で format
NSString の stringWithFormat 相当。
let h = lifeTime / 3600 let m = (lifeTime / 60) % 60 let s = lifeTime % 60 let formattedTime = String(format: "%lu:%02lu:%02lu", h, m, s)
NSString の stringWithFormat 相当。
let h = lifeTime / 3600 let m = (lifeTime / 60) % 60 let s = lifeTime % 60 let formattedTime = String(format: "%lu:%02lu:%02lu", h, m, s)