Created
August 6, 2014 18:47
-
-
Save waprin/ec2e546af4e87f7a4e5b to your computer and use it in GitHub Desktop.
Concatenate Multi-Line Java String Literals
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
import fileinput | |
x = "" | |
for line in fileinput.input(): | |
x += line | |
s = "" | |
i = 1 | |
while i < len(x): | |
if x[i] == '"': | |
i += 1 | |
while i < len(x) and x[i] != '"': | |
i = i + 1 | |
else: | |
s += x[i] | |
i += 1 |
Author
waprin
commented
Aug 6, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment