Re: String represents arrays of characters.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: String represents arrays of characters.
 
- From: steve donovan <steve.j.donovan@...>
 
- Date: 2010年12月14日 10:29:02 +0200
 
On Mon, Dec 13, 2010 at 10:44 PM, Dirk Laurie <dpl@sun.ac.za> wrote:
> In the light of that statement, one can't be blamed for expecting
> that s[i] means the i-th character of a string.  At present, s[i]
> is nil, even if i is in the range 1 to #s -- another gotcha.
I suspect that there's a very straightforward C extension waiting to
be written which provides an array of bytes which can be freely
translated to and from strings. sb[i] can also then be assigned to, of
course, and generally would be more efficient for applications that
need these kinds of string operations.
steve d.