Created
April 20, 2021 09:29
-
-
Save EmmanuelGuther/9f424072c39ccd604d8261d47a84423f to your computer and use it in GitHub Desktop.
How to delete whitespace (newlines, spaces, tabs, etc) without regex?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun String.removeWhitespace(): String = filterNot { it.isWhitespace() } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment