rename last-slice1 to slice1-last

db4
Doug Coleman 2008-11-22 20:00:37 -06:00
parent 26cb48b0ab
commit fb8bdfe7e5
6 changed files with 7 additions and 7 deletions

View File

@ -26,7 +26,7 @@ IN: cocoa.dialogs
[ -> filenames CF>string-array ] [ drop f ] if ;
: split-path ( path -- dir file )
"/" last-split1 [ <NSString> ] bi@ ;
"/" split1-last [ <NSString> ] bi@ ;
: save-panel ( path -- paths )
<NSSavePanel> dup

View File

@ -36,7 +36,7 @@ TUPLE: line-break ;
{ "http://" "https://" "ftp://" } [ head? ] with contains? ;
: simple-link-title ( string -- string' )
dup absolute-url? [ "/" last-split1 swap or ] unless ;
dup absolute-url? [ "/" split1-last swap or ] unless ;
EBNF: parse-farkup
nl = ("\r\n" | "\r" | "\n") => [[ drop "\n" ]]

View File

@ -153,7 +153,7 @@ ERROR: invalid-header-string string ;
: extract-email ( recepient -- email )
! This could be much smarter.
" " last-split1 swap or "<" ?head drop ">" ?tail drop ;
" " split1-last swap or "<" ?head drop ">" ?tail drop ;
: email>headers ( email -- hashtable )
[

View File

@ -132,7 +132,7 @@ M: url present
{ [ dup empty? ] [ drop ] }
{ [ over "/" tail? ] [ append ] }
{ [ "/" pick start not ] [ nip ] }
[ [ "/" last-split1 drop "/" ] dip 3append ]
[ [ "/" split1-last drop "/" ] dip 3append ]
} cond ;
PRIVATE>

View File

@ -150,7 +150,7 @@ PRIVATE>
] unless ;
: file-extension ( filename -- extension )
"." last-split1 nip ;
"." split1-last nip ;
! File info
TUPLE: file-info type size permissions created modified

View File

@ -44,7 +44,7 @@ DEFER: shallow-fry
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: deep-fry ( quot -- quot )
{ _ } last-split1 dup
{ _ } split1-last dup
[
shallow-fry [ >r ] rot
deep-fry [ [ dip ] curry r> compose ] 4array concat
@ -77,4 +77,4 @@ DEFER: shallow-fry
MACRO: fry ( seq -- quot ) [fry] ;
: '[ \ ] [ >quotation ] parse-literal \ fry parsed ; parsing
: '[ \ ] [ >quotation ] parse-literal \ fry parsed ; parsing