2005-01-29 14:18:28 -05:00
|
|
|
! 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
|
2005-12-25 21:05:31 -05:00
|
|
|
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 ;
|
2005-09-10 18:27:31 -04:00
|
|
|
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 ;
|