mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: adjusted memory format to be more readable (#2416)
This commit is contained in:
@@ -197,8 +197,10 @@ public struct Units {
|
||||
formatter.includesUnit = true
|
||||
formatter.isAdaptive = true
|
||||
|
||||
var value = formatter.string(fromByteCount: Int64(bytes))
|
||||
value = value.replacingOccurrences(of: ",", with: ".")
|
||||
var value = formatter.string(fromByteCount: Int64(self.bytes))
|
||||
if let idx = value.lastIndex(of: ",") {
|
||||
value.replaceSubrange(idx...idx, with: ".")
|
||||
}
|
||||
|
||||
return value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user