Changeset 19300 for docs

Show
Ignore:
Timestamp:
01/02/08 01:26:09 (12 months ago)
Author:
lwall
Message:

Clarification of substr requested by Gothmog++ and pmurias++

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • docs/Perl6/Spec/Functions.pod

    r17750 r19300  
    1313                Mark Stosberg <mark@summersault.com> 
    1414 Date:          12 Mar 2005 
    15  Last Modified: 16 Mar 2007 
    16  Version:       14 
     15 Last Modified: 1 Jan 2008 
     16 Version:       15 
    1717 
    1818This document attempts to document the list of builtin functions in Perl 6. 
     
    13571357 our Str multi method substr (Str $string: StrPos $start, StrLen $length?) is rw is export 
    13581358 our Str multi method substr (Str $string: StrPos $start, StrPos $end?) is rw is export 
     1359 our Str multi method substr (Str $string: StrPos $start, Int $length) is rw is export 
    13591360 
    13601361C<substr> returns part of an existing string. You control what part by 
     
    13621363If you pass a number as either the position or length, then it will be used 
    13631364as the start or length with the assumtion that you mean "chars" in the 
    1364 current Unicode abstraction level, which defaults to graphemes. 
     1365current Unicode abstraction level, which defaults to graphemes.  A number 
     1366in the 3rd argument is interpreted as a length rather than a position (just 
     1367as in Perl 5). 
    13651368 
    13661369Here is an example of its use: