factor/library/collections/sbuf.factor

16 lines
577 B
Factor
Raw Permalink Normal View History

! Copyright (C) 2004, 2005 Slava Pestov.
! See http://factor.sf.net/license.txt for BSD license.
2005-04-02 02:39:33 -05:00
IN: strings
USING: kernel math strings sequences-internals sequences ;
2005-04-02 02:39:33 -05:00
2005-06-10 16:08:00 -04:00
M: string resize resize-string ;
2005-12-30 03:57:38 -05:00
M: sbuf set-length grow-length ;
M: sbuf nth-unsafe underlying nth-unsafe ;
M: sbuf nth bounds-check nth-unsafe ;
M: sbuf set-nth-unsafe underlying set-nth-unsafe ;
M: sbuf set-nth growable-check 2dup ensure set-nth-unsafe ;
M: sbuf clone clone-growable ;
2005-12-31 20:51:58 -05:00
M: sbuf thaw drop SBUF" " clone ;
2006-01-02 00:51:03 -05:00
: >sbuf [ <sbuf> ] >sequence ; inline
M: sbuf like drop dup sbuf? [ >sbuf ] unless ;