swapCase method
Swaps upper-case and lower-case for each character.
Implementation
@useResult
String swapCase() => split(
'',
).map((String ch) => ch.toUpperCase() == ch ? ch.toLowerCase() : ch.toUpperCase()).join();
Swaps upper-case and lower-case for each character.
@useResult
String swapCase() => split(
'',
).map((String ch) => ch.toUpperCase() == ch ? ch.toLowerCase() : ch.toUpperCase()).join();