Author: lwall
Date: 2009-04-08 18:29:54 +0200 (Wed, 08 Apr 2009)
New Revision: 26129
Modified:
docs/Perl6/Spec/S32-setting-library/Containers.pod
docs/Perl6/Spec/S32-setting-library/Str.pod
Log:
[S32/Containers] join defaults to '' now; delete string reverse
[S32/Str] add string flip
Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/Containers.pod 2009-04-08 15:08:15 UTC
(rev 26128)
+++ docs/Perl6/Spec/S32-setting-library/Containers.pod 2009-04-08 16:29:54 UTC
(rev 26129)
@@ -214,17 +214,16 @@
=item join
- our Str multi method join ( @values: Str $separator = ' ' )
- our Str multi join ( Str $separator = ' ', *...@values )
+ our Str multi method join ( @values: Str $separator = '' )
+ our Str multi join ( Str $separator = '', *...@values )
C<join> returns a single string comprised of all of the elements
of C<@values>, separated by C<$separator>.
Given an empty list, C<join> returns the empty string.
-The separator defaults to a single space. To join with no separator,
-you can use the C<[~]> reduce operator. The C<cat> function also
-effectively does a concatenation with no separator.
+The separator defaults to the null string. To join with space,
+just coerce to C<Str>.
=item map
@@ -282,12 +281,6 @@
}
}
- role Str {
- our Str multi method reverse ( $str: ) is export {
- $str.split('').reverse.join;
- }
- }
-
=item sort
our Array multi method sort( @values: *&by )
Modified: docs/Perl6/Spec/S32-setting-library/Str.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/Str.pod 2009-04-08 15:08:15 UTC (rev
26128)
+++ docs/Perl6/Spec/S32-setting-library/Str.pod 2009-04-08 16:29:54 UTC (rev
26129)
@@ -372,6 +372,17 @@
are never returned. If the function is combing a lazy structure,
the return values may also be lazy. (Strings are not lazy, however.)
+=item flip
+
+The C<flip> function reverses a string character by character.
+
+ our Str multi method flip ( $str: ) is export {
+ $str.comb(/./).reverse.join;
+ }
+
+This function will misplace accents if used at a Unicode
+level less than graphemes.
+
=item sprintf
our Str multi method sprintf ( Str $format: *...@args ) is export