Skip to content

Instantly share code, notes, and snippets.

@cozzin
Created July 5, 2018 05:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cozzin/38f96ef35a26c1a011f4f1a65c3443b0 to your computer and use it in GitHub Desktop.
Save cozzin/38f96ef35a26c1a011f4f1a65c3443b0 to your computer and use it in GitHub Desktop.
func formatByteCount(bytes: Int64) -> String {
let byteCountFormatter = ByteCountFormatter()
return byteCountFormatter.string(fromByteCount: bytes)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment