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 ; [ -> filenames CF>string-array ] [ drop f ] if ;
: split-path ( path -- dir file ) : split-path ( path -- dir file )
"/" last-split1 [ <NSString> ] bi@ ; "/" split1-last [ <NSString> ] bi@ ;
: save-panel ( path -- paths ) : save-panel ( path -- paths )
<NSSavePanel> dup <NSSavePanel> dup

View File

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

View File

@ -153,7 +153,7 @@ ERROR: invalid-header-string string ;
: extract-email ( recepient -- email ) : extract-email ( recepient -- email )
! This could be much smarter. ! 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 ) : email>headers ( email -- hashtable )
[ [

View File

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

View File

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

View File

@ -44,7 +44,7 @@ DEFER: shallow-fry
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: deep-fry ( quot -- quot ) : deep-fry ( quot -- quot )
{ _ } last-split1 dup { _ } split1-last dup
[ [
shallow-fry [ >r ] rot shallow-fry [ >r ] rot
deep-fry [ [ dip ] curry r> compose ] 4array concat deep-fry [ [ dip ] curry r> compose ] 4array concat