package com.adealink.weparty.commonui.text.filter

import android.text.InputFilter
import android.widget.EditText

fun EditText.setFilter(vararg filter: InputFilter) {
    this.filters = filter
}

fun EditText.addFilter(vararg filter: InputFilter) {
    val newFilters = mutableListOf<InputFilter>()
    this.filters?.forEach {
        newFilters.add(it)
    }
    newFilters.addAll(filter)
    this.filters = newFilters.toTypedArray()
}