Sha256: 2b9b545a717b454e669961da894cb007d79bfe648eba4f8671a874fb8b65c158
Contents?: true
Size: 541 Bytes
Versions: 2
Compression:
Stored size: 541 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require "newt" text = "" width = 0 height = 0 begin Newt::Screen.new text, width, height = Newt.reflow_text("This is a quite a bit of text. It is 40 " + "columns long, so some wrapping should be " + "done. Did you know that the quick, brown " + "fox jumped over the lazy dog?\n\n" + "In other news, it's pretty important that we " + "can properly force a line break.", 40, 5, 5) ensure Newt::Screen.finish end p text p width p height
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
newt-0.9.7 | examples/test_method/ReflowText.rb |
newt-0.9.2 | examples/test_method/ReflowText.rb |