Updated on 2026-08-14

This commit is contained in:
Tangem 2024-09-07 18:07:12 +03:00
parent fbf91e4c6d
commit 3e7108d417
5 changed files with 25 additions and 35 deletions

View file

@ -1,16 +0,0 @@
package com.tangem.utils.extensions
import com.tangem.utils.StringsSigns.STARS
/**
* Returns the string itself if hide is false, otherwise returns a string of stars.
*
* @param hide A boolean flag that determines whether to hide the string.
* If true, the string will be hidden (replaced by `STARS`).
* If false, the original string will be returned.
*
* @return The original string if hide is false, or STARS if hide is true.
*/
fun String.orHide(hide: Boolean): String {
return if (hide) STARS else this
}