core-ktx / androidx.database / android.database.Cursor / getStringOrNull

getStringOrNull

inline fun Cursor.getStringOrNull(index: Int): String?

Returns the value of the requested column as a nullable string.

The result and whether this method throws an exception when the column type is not a string type is implementation-defined.

See Also

Cursor.isNull

Cursor.getString

inline fun Cursor.getStringOrNull(columnName: String): String?

Returns the value of the requested column as a nullable string.

The result and whether this method throws an exception when the column type is not a string type is implementation-defined.

See Also

Cursor.getColumnIndexOrThrow

Cursor.isNull

Cursor.getString