in Android I have something like R.string.whatever_text
instead to pass in a function R.string.whatever_text
fun pass(string: Int) {
getString(string)
}
I want to know a way to pass only whatever_text
ex
fun pass(genericString:String) {
getString(R.string.genericString)
}
Please notice the example of R.string.whatever_text is not relevant, I am speaking in general, want to achieve that can pass as a String a part of what i need instead to repeat long lines ex could have been NavigationDestination.whateverDestination.screenRoute or whatever code