mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-07 13:35:09 +00:00
no message
This commit is contained in:
10
TelegramCore/StringFormat.swift
Normal file
10
TelegramCore/StringFormat.swift
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
func dataSizeString(_ size: Int) -> String {
|
||||
if size >= 1024 * 1024 {
|
||||
return "\(size / (1024 * 1024)) MB"
|
||||
} else if size >= 1024 {
|
||||
return "\(size / 1024) KB"
|
||||
} else {
|
||||
return "\(size) B"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user