splitting: crlf? was unnecessary.
parent
5b1b6b6bbb
commit
9d2a1a6b7c
|
@ -91,18 +91,10 @@ PRIVATE>
|
|||
: split*-when ( ... seq quot: ( ... elt -- ... ? ) -- ... pieces )
|
||||
[ split*, ] { } make ; inline
|
||||
|
||||
<PRIVATE
|
||||
|
||||
: crlf? ( str -- ? )
|
||||
[ dup CHAR: \r = [ drop t ] [ CHAR: \n = ] if ] find drop ;
|
||||
inline
|
||||
|
||||
PRIVATE>
|
||||
|
||||
GENERIC: string-lines ( str -- seq )
|
||||
|
||||
M: string string-lines
|
||||
dup crlf? [
|
||||
dup [ "\r\n" member? ] any? [
|
||||
"\n" split
|
||||
[
|
||||
but-last-slice [
|
||||
|
|
Loading…
Reference in New Issue