[android-components](../../index.md) / [mozilla.components.feature.downloads](../index.md) / [kotlin.Long](index.md) / [toMegabyteString](./to-megabyte-string.md)

# toMegabyteString

`fun `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`.toMegabyteString(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/feature/downloads/src/main/java/mozilla/components/feature/downloads/DownloadDialogFragment.kt#L65)

Converts the bytes to megabytes with two decimal places and returns a formatted string

