struct Textwrap::Scanner

Defined in:

textwrap.cr

Constant Summary

WHITESPACE = /\s/
WORD_SEPARATORS = /\s|-/

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(string : String) #

[View source]

Class Method Detail

def self.wrap_text(string, target_width : Number = 80) #

[View source]

Instance Method Detail

def words : Iterator(String) #

[View source]
def wrap_paragraph(target_width : Number = 80, & : String -> _) : Nil #

[View source]
def wrap_paragraph(target_width : Number = 80) : String #

[View source]