yeah, not the best example but in general how to u...
# android
y
yeah, not the best example but in general how to use extension function declared in some class? Or it doesn't have sense at all? Like if we declare
Copy code
fun String.lastChar(): Char = this[length - 1]
inside some class and try to use it in another class which is not inherited from class where extension function is declared In previous example we could declare function lastChar and after that tried to use it inside fragment class