zcash-android-wallet-sdk / cash.z.wallet.sdk.ext / kotlin.String / toAbbreviatedAddress

toAbbreviatedAddress

fun String.toAbbreviatedAddress(startLength: Int = 8, endLength: Int = 8): String

Abbreviates this string which is assumed to be an address.

Parameters

startLength - the number of characters to show before the elipsis.

endLength - the number of characters to show after the elipsis.

Return
the abbreviated string unless the string is too short, in which case the original string is returned.