Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

implement tclc

  • Loading branch information...
commit 4fe23e75905bb270664b4056a46b8d5fa09de85f 1 parent a4eacdf
@moritz moritz authored
View
3  docs/ChangeLog
@@ -1,3 +1,6 @@
+New in 2012.08
++ tclc implemented
+
New in 2012.07
+ Deprecated SAFE.setting in favor of RESTRICTED.setting
+ Ranges can now interpolate in argument lists
View
7 src/core/Cool.pm
@@ -82,6 +82,10 @@ my class Cool {
nqp::p6box_s(nqp::lc(nqp::unbox_s(self.Str)))
}
+ method tclc() {
+ self.Str.tclc;
+ }
+
method ucfirst() is DEPRECATED {
my $self-str = self.Str;
$self-str eq '' ?? '' !! $self-str.substr(0, 1).uc ~ $self-str.substr(1)
@@ -220,6 +224,9 @@ proto sub capitalize(|$) { * }
multi sub capitalize(Str:D $x) {$x.capitalize }
multi sub capitalize(Cool $x) {$x.Stringy.capitalize }
+proto sub tclc(|$) { * }
+multi sub tclc(Cool $x) { tclc $x.Str }
+
sub sprintf(Cool $format, *@args) {
@args.gimme(*);
nqp::p6box_s(
View
8 src/core/Str.pm
@@ -908,6 +908,10 @@ my class Str does Stringy {
$_<indent-chars>».key.join ~ ' ' x ($pos - $outdent) ~ $_<rest>;
}).join;
}
+
+ method tclc(Str:D:) {
+ nqp::p6box_s(nqp::tclc(nqp::unbox_s(self)))
+ }
}
@@ -1011,3 +1015,7 @@ sub substr-rw($s is rw, $from = 0, $chars = $s.chars - $from) {
}
);
}
+
+multi sub tclc(Str:D $s) {
+ nqp::p6box_s(nqp::tclc(nqp::unbox_s($s)));
+}
View
1  t/spectest.data
@@ -638,6 +638,7 @@ S32-str/split.t
S32-str/sprintf.t
S32-str/substr.t
S32-str/substr-rw.t
+S32-str/tclc.t # icu
S32-str/trim.t
S32-str/uc.t # icu
S32-str/unpack.t
View
2  tools/build/NQP_REVISION
@@ -1 +1 @@
-2012.07
+2012.07-14-gcff22c2
Please sign in to comment.
Something went wrong with that request. Please try again.