Satyam G
05/20/2022, 9:52 AMobject Extensions{
fun TextUtils.checkEmpty(str: String?): String? {
if (!TextUtils.isEmpty(str)) {
return str
} else {
return null
}
}
}
I have written this but not able to access this method. What is getting wrong here ??Maroš Šeleng
05/20/2022, 9:58 AMTextUtils
, therefore you need to call it on an instance of TextUtils
, which cannot be instantiated, because it has private constructor.ephemient
05/20/2022, 10:00 AMstr?.ifEmpty { null }