library / org.akop.kotx.ext.content / android.content.res.Resources / rawResourceAsString

rawResourceAsString

fun Resources.rawResourceAsString(@RawRes resId: Int): String

Reads and returns a raw resource as a string.

Intended use is for smaller text files, since buffering is done on the calling thread.

Parameters

resId - Raw resource identifier.

Return
Contents of raw resource as a string.