Skip to content

xfix/perl6-Text-Abbrev

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
t
 
 
 
 
 
 
 
 

Text::Abbrev - create an abbreviation table from a list.

Synopsis

use Text::Abbrev;

# You can say "y" or "n" too
my $option = abbrev(<yes no>){lc prompt "Y/N? "};
if $option {
    say "You have said {$option.titlecase}.";
}
else {
    say "Sorry, unknown option.";
}

Functions

abbrev

The only function exported by this module which will return unambigous truncations of every option in list. For example, when you will call abbrev <break brick> you will get following hash.

(
    # break
    "break" => "break",
    "brea"  => "break",
    "bre"   => "break",
    # brick
    "brick" => "brick",
    "bric"  => "brick",
    "bri"   => "brick",
)

Author

GlitchMr glitchmr@myopera.com

About

Text::Abbrev for Perl 6

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages

  • Other 100.0%