module Pretty
Overview
Pretty.truncate
returns a copy of its receiver truncated after a given length
Usage
Pretty.truncate("Hello World", size: 3) # => "Hel..."
Extended Modules
Defined in:
pretty/bytes.crpretty/date.cr
pretty/diff.cr
pretty/dir.cr
pretty/error.cr:10
pretty/error.cr:45
pretty/file.cr
pretty/json.cr
pretty/lines.cr
pretty/method.cr:1
pretty/method.cr:40
pretty/number.cr
pretty/string.cr
pretty/time.cr
pretty/truncate.cr
Class Method Summary
- .bytes(bytes, block = 1000, prefix = " ", suffix = "B")
- .camelize(str : String)
- .classify(str : String)
- .date(value : String) : ::Time
- .date?(value : String) : ::Time | Nil
- .dates(value : String) : Array(::Time)
- .dates?(value : String) : Array(::Time) | Nil
- .diff(*args, **opts)
- .epoch(seconds : Int) : ::Time
- .epoch_ms(milliseconds : Int) : ::Time
- .error(err : Exception)
- .json(json : String, color : Bool = false) : String
- .lines(lines : Array(Array(String)), indent : String = "", delimiter : String = "") : String
- .mem_info : Pretty::MemInfo
- .method(obj)
- .number(n : Int)
- .process_info(pid : Int32 | Nil = nil) : Pretty::ProcessInfo
- .time(value : String, location : ::Time::Location | Nil = nil) : ::Time
- .time?(value : String, location : ::Time::Location | Nil = nil) : ::Time | Nil
- .truncate(text, size = 20)
- .underscore(str : String)
- .version(s : String)
Class Method Detail
def self.lines(lines : Array(Array(String)), indent : String = "", delimiter : String = "") : String
#
def self.time?(value : String, location : ::Time::Location | Nil = nil) : ::Time | Nil
#