zcash-android-wallet-sdk / cash.z.wallet.sdk.ext / kotlin.Double / toZecString

toZecString

fun Double?.toZecString(maxDecimals: Int = ZEC_FORMATTER.maximumFractionDigits, minDecimals: Int = ZEC_FORMATTER.minimumFractionDigits): String

Format a ZEC value into ZEC with the given number of digits, represented as a string. Start with ZEC -> End with ZEC.

Parameters

maxDecimals - the number of decimal places to use in the format. Default is 6 because ZEC is better when right.

minDecimals - the minimum number of digits to allow to the right of the decimal.

Return
this Double ZEC value represented as a string with at least minDecimals and at most maxDecimals.