swapcase

fun String.swapcase(): String

It makes a copy of a string with uppercase alphabetic characters converted to lowercase and lowercase characters converted to uppercase. The case of non-alphabetic characters is not changed.

Return

a copy of the string with the characters converted to the opposite case.

Sources

Link copied to clipboard