library / org.akop.kotx.ext.app / androidx.fragment.app.Fragment / getStringSafe

getStringSafe

fun Fragment.getStringSafe(@StringRes resId: Int): String?

Returns string with specified resource identifier, or null if the fragment isn't attached to an activity.

fun Fragment.getStringSafe(@StringRes resId: Int, vararg args: Any?): String?

Returns string with specified resource identifier and format arguments, or null if the fragment isn't attached to an activity.