Changeset 17196 for docs/Perl6/Spec

Show
Ignore:
Timestamp:
08/03/07 21:03:34 (16 months ago)
Author:
lwall
Message:

substr should be exported multi method
updated grammar description of printf formats to use newer, cleaner notation

Files:
1 modified

Legend:

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

    r16156 r17196  
    976976[Default can't be C<CharLingua> because we don't go into "language" 
    977977mode unless there's a specific language declaration saying either 
    978 exactly what language we're going into.] 
     978exactly what language we're going into or, in the absence of that, how to 
     979find the exact language somewhere in the enviroment.] 
    979980 
    980981Attempting to use a string at a level higher it can support is handled 
     
    12681269 
    12691270 grammar Str::SprintfFormat { 
    1270   regex format_token { \%: <index>? <precision>? <modifier>? <directive> } 
    1271   token index { \d+ \$ } 
     1271  regex format_token { '%': <index>? <precision>? <modifier>? <directive> } 
     1272  token index { \d+ '$' } 
    12721273  token precision { <flags>? <vector>? <precision_count> } 
    1273   token flags { <[\ +0\#\-]>+ } 
    1274   token precision_count { [ <[1-9]>\d* | \* ]? [ \. [ \d* | \* ] ]? } 
    1275   token vector { \*? v } 
    1276   token modifier { ll | <[lhmVqL]> } 
    1277   token directive { <[\%csduoxefgXEGbpniDUOF]> } 
     1274  token flags { <[ \x20 + 0 \# \- ]>+ } 
     1275  token precision_count { [ <[1..9]>\d* | '*' ]? [ '.' [ \d* | '*' ] ]? } 
     1276  token vector { '*'? v } 
     1277  token modifier { < ll l h m V q L > } 
     1278  token directive { < % c s d u o x e f g X E G b p n i D U O F > } 
    12781279 } 
    12791280 
     
    13501351=item substr 
    13511352 
    1352  our Str multi substr (Str $s, StrPos $start, StrLen $length?) is rw 
    1353  our Str multi substr (Str $s, StrPos $start, StrPos $end?) is rw 
     1353 our Str multi method substr (Str $string: StrPos $start, StrLen $length?) is rw is export 
     1354 our Str multi method substr (Str $string: StrPos $start, StrPos $end?) is rw is export 
    13541355 
    13551356C<substr> returns part of an existing string. You control what part by