Skip to content
Permalink
Browse files

univals() should be handled by Str.univals

- so add that
- refer all others to Str.univals
  • Loading branch information...
lizmat committed Jan 5, 2019
1 parent 485dec4 commit 64c88f919841c58f5a6dffd3581770e06a8fd6a5
Showing with 3 additions and 2 deletions.
  1. +2 −2 src/core/Cool.pm6
  2. +1 −0 src/core/Str.pm6
@@ -104,7 +104,7 @@ my class Cool { # declared in BOOTSTRAP
method uniname() { uniname(self) }
method uninames() { uninames(self) }
method unival(Cool:D:) { self.Int.unival }
method univals() { univals(self) }
method univals(Cool:D:) { self.Str.univals }
method uniprop(|c) { uniprop(self, |c) }
method uniprop-int(|c) { uniprop-int(self, |c) }
method uniprop-bool(|c) { uniprop-bool(self, |c) }
@@ -405,7 +405,7 @@ multi sub unival(Str:D $str) { $str ?? $str.ord.unival !! Nil }
multi sub unival(Int:D $code) { $code.unival }

proto sub univals($, *%) {*}
multi sub univals(Str:D $str) { $str.ords.map: { .unival } }
multi sub univals(Str:D $str) { $str.univals }
#?endif

#?if moar
@@ -2302,6 +2302,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
#?endif

method unival(Str:D:) { self ?? self.ord.unival !! Nil }
method univals(Str:D:) { self.ords.map: *.unival }

method wordcase(Str:D: :&filter = &tclc, Mu :$where = True --> Str:D) {
self.subst(:g, / [<:L> \w* ] +% <['\-]> /, -> $m { # ' highlighting

0 comments on commit 64c88f9

Please sign in to comment.
You can’t perform that action at this time.