what is this "it <= ' '" in trim string function mean here

Viewed 7990

I have this Java code to trim a string

String title = titleEt.getText().toString().trim();

When I convert to kotlin, I expect this should be the kotlin code to trim the leading and trailing spaces.

val title = titleEt.text.toString().trim()

However, the IDE generates this code

val title = titleEt.text.toString().trim { it <= ' ' }

What is this { it <= ' ' } here? Is it any char less and than ' '?

4 Answers
Related