stk:file.format-bytes(function)

Formats (shortens) an integer representing bytes into either KB, MB or GB, depending on size.

xs:stringstk:file.format-bytes
  1. xs:integerbytes

Examples

Input

<xsl:value-of select="stk:file.format-bytes(1048576)"/>

Result

1 MB

Parameters

bytes
Number of bytes to format
Type
xs:integer