Skip to content

vendethiel/Formatter-Align

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Formatter::Align

Easily format an array in an aligned table.

Usage:

use Formatter::Align;

my @headers = <<ID Name Type "Family Name">>;
my @data =
  (1, "George", "CEO", "Reagen"),
  (2, "Tami", "Employee", "?"),
  (3, "Kaaris", "CXO", "Rap");

# The headers are optional.
say format(@data, @headers);

Output:

 ID  Name    Type      Family Name 
 ==  ====    ====      =========== 
 1   George  CEO       Reagen      
 2   Tami    Employee  ?           
 3   Kaaris  CXO       Rap         

Options:

  • padding-from: The space at the beginning of a column.
  • padding-to: The space at the end of a column.

About

Perl6 "Aligned Table"-style Formatter

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%