Snippets Project Page
Author: entropy
Added: 5y
Updated: 5y
mIRC: 7.52+
Hits: 847
Downloads: 9
Review: entropy
Size: 425B
1 0
Login to vote.
Convert to Bytes
v1.1
Usage: $convert(100K - returns bytes
Download
JSON
▲ Review
▼ Source
; Convert to Bytes v1.1 - by entropy 2017 ; Place in Remotes (alt+r) ; Usage: $convert(100KB) - returns bytes alias convert { var %1TB = 1099511627776, %1GB = 1073741824, %1MB = 1048576, %1KB = 1024 return $iif(*TB iswm $1,$calc($remove($1,TB) * %1TB),$iif(*GB iswm $1,$calc($remove($1,GB) * %1GB),$iif(*MB iswm $1,$calc($remove($1,MB) * %1MB),$iif(*KB iswm $1,$calc($remove($1,KB) * %1KB),$1))))) }
Changelog:
0
0