Created
August 29, 2012 14:10
-
-
Save carlobaldassi/3513128 to your computer and use it in GitHub Desktop.
TextWrap example
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
require("textwrap.jl") | |
import TextWrap.* | |
import OptionsMod.* | |
text = "Julia is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users of other technical computing environments. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library." | |
println("DEFAULT OPTIONS") | |
println("-"^70) | |
println_wrapped(text) | |
println("-"^70) | |
println() | |
println("WIDTH = 30, FIX_SENTENCE_ENDINGS = true") | |
println("-"^30) | |
println_wrapped(text, @options(width=>30, fix_sentence_endings=>true)) | |
println("-"^30) |
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
DEFAULT OPTIONS | |
---------------------------------------------------------------------- | |
Julia is a high-level, high-performance dynamic programming language | |
for technical computing, with syntax that is familiar to users of | |
other technical computing environments. It provides a sophisticated | |
compiler, distributed parallel execution, numerical accuracy, and an | |
extensive mathematical function library. | |
---------------------------------------------------------------------- | |
WIDTH = 30, FIX_SENTENCE_ENDINGS = true | |
------------------------------ | |
Julia is a high-level, high- | |
performance dynamic | |
programming language for | |
technical computing, with | |
syntax that is familiar to | |
users of other technical | |
computing environments. It | |
provides a sophisticated | |
compiler, distributed parallel | |
execution, numerical accuracy, | |
and an extensive mathematical | |
function library. | |
------------------------------ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment