guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: substring


From: nalaginrut
Subject: Re: substring
Date: Sat, 08 Sep 2012 10:00:02 +0800

On Fri, 2012-09-07 at 21:49 +0400, . wrote: 
> Hi,
> 
> Why do we need substring [1]? We already have string-copy which looks
> similar to me.
> (These functions take different number of arguments, but string-copy
> can handle this because it's more generic.)
> 
> Is this connected with compatability, convenience or something else?
> 
> [1] 
> http://www.gnu.org/software/guile/manual/html_node/String-Selection.html#String-Selection
> 

*string-copy is actually substring/copy, which is a newly allocated
string buffer.

*substring is a copy-on-write version.

*substring/shared is actually the same string buffer with the original
string. It won't do any copy operation.



> Thanks
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]