Skip to content

Commit

Permalink
make extensions internal
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahimsn98 committed Jun 30, 2021
1 parent a6daa33 commit 0d13817
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/src/main/java/me/ibrahimsn/lib/util/Extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,36 @@ import android.view.View
import android.widget.EditText
import me.ibrahimsn.lib.Constants.CHAR_PLUS

fun CharSequence?.prependPlus(): String {
internal fun CharSequence?.prependPlus(): String {
return StringBuilder()
.append(CHAR_PLUS)
.append(this)
.toString()
}

fun Int.prependPlus(): String {
internal fun Int.prependPlus(): String {
return StringBuilder()
.append(CHAR_PLUS)
.append(this)
.toString()
}

fun CharSequence?.startsWithPlus(): Boolean {
internal fun CharSequence?.startsWithPlus(): Boolean {
return this?.startsWith(CHAR_PLUS) == true
}

fun String?.clearSpaces(): String? {
internal fun String?.clearSpaces(): String? {
return this?.replace("\\s+", "")
}

fun <T> Collection<T>.toRawString(): String {
internal fun <T> Collection<T>.toRawString(): String {
return this.joinToString("")
}

fun EditText.clear() {
internal fun EditText.clear() {
this.setText("")
}

fun View.showIf(statement: Boolean) {
internal fun View.showIf(statement: Boolean) {
visibility = if (statement) View.VISIBLE else View.GONE
}

0 comments on commit 0d13817

Please sign in to comment.