Advertisement
emga9xkc

UDF _ByteSuffix - Chuyển đổi đơn vị lưu trữ Autoit

Feb 13th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.28 KB | None | 0 0
  1. Func _ByteSuffix($iBytes, $iRound = 2)
  2.     Local $A, $aArray[9] = [" B", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB"]
  3.     While $iBytes > 1023
  4.         $A += 1
  5.         $iBytes /= 1024
  6.     WEnd
  7.     Return Round($iBytes, $iRound) & $aArray[$A]
  8. EndFunc   ;==>_ByteSuffix
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement