Created
August 22, 2015 20:22
-
-
Save ttldtor/e61dcef003f925086009 to your computer and use it in GitHub Desktop.
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
import std.string; | |
import std.algorithm; | |
import std.array; | |
import std.format; | |
string stripMargin(string s, char marginChar = '|') { | |
return s.splitLines.map!(line => line.stripLeft.chompPrefix("" ~ marginChar)).join("\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment