Author: masak
Date: 2010-06-03 15:35:39 +0200 (Thu, 03 Jun 2010)
New Revision: 31081

Modified:
   docs/Perl6/Spec/S32-setting-library/Str.pod
Log:
[S32/Str] proposed Str.indent

Following an idea bounced around on #perl6, this method was added.

Modified: docs/Perl6/Spec/S32-setting-library/Str.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/Str.pod 2010-06-03 13:07:35 UTC (rev 
31080)
+++ docs/Perl6/Spec/S32-setting-library/Str.pod 2010-06-03 13:35:39 UTC (rev 
31081)
@@ -583,6 +583,20 @@
 
  our multi trans(List of Pair %data);
 
+=item indent
+
+     our Str multi method indent ($str: $steps) is export;
+
+Returns a re-indented string wherein C<$steps> number of spaces have been added
+to each line (i.e. to the beginning of the string and after each logical
+newline).
+
+If C<$steps> is negative, removes that many spaces instead. Should any line
+contain too few leading spaces, only those are removed and a warning is issued.
+
+Only spaces are considered indentation; tabs or other Unicode whitespace
+characters are not considered.
+
 =back
 
 =head1 Additions

Reply via email to