DEV Community

Discussion on: Don't use .first() without handling exceptions

Collapse
 
vanhine profile image
Adam Van Hine

First should only throw if the string is empty. So you could also check to make sure it wasn't empty to avoid the exception. kotlinlang.org/api/latest/jvm/stdl...