KotlinStringisBlank

Returns true if the string is empty or consists of only whitespace.

Syntax

str.isBlank()