Created
October 5, 2018 08:17
-
-
Save franciscoj/1e507ea281875b455c99c6b0003ed076 to your computer and use it in GitHub Desktop.
Remove last line feed from multiline string in elixir
This file contains 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
content = """ | |
hello! | |
""" | |
assert content == "hello!\n" | |
content = """ | |
hello!\ | |
""" | |
assert content == "hello!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment