| parrotcode: Perl 6 Str class and related functions | |
| Contents | Language Implementations | Perl6 |

Str - Perl 6 Str class and related functions

This file sets up the Perl6Str PMC type (from src/pmc/perl6str.pmc) as the Perl 6 Str class.



our Char multi P5emul::Str::p5chop ( Str $string is rw )
our Char multi P5emul::Str::p5chop ( Str *@strings = ($+_) is rw )
$string, and returns it. Called with a list, it chops each item in turn, and returns the last character chopped. our Int multi P5emul::Str::p5chomp ( Str $string is rw )
our Int multi P5emul::Str::p5chomp ( Str *@strings = ($+_) is rw )
p5chop, only removes trailing chars that match /\n/. In either case, it returns the number of chars removed. our Str method Str::chomp ( Str $string: )
our List multi Str::words ( Rule $matcher = /\S+/, Str $input = $+_, Int $limit = inf )
our List multi Str::words ( Str $input : Rule $matcher = /\S+/, Int $limit = inf )
|
|
|