jed-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Re: string2array ?


Guenter Milde <milde@xxxxxxxxxxxxxxxxxxxx> wrote:
>One question: Why is the function called bstring_to_array? 
>Actually I expected a binary string to be something special. Or is it just a
>normal string (used for storing numbers).

S-Lang 1.x supports two string objects: String_Type and BString_Type.
The String_Type objects represent ordinary null terminated strings
where the length of the string is determined by the location of the
null character.  A BString_Type object permits embedded null
characters, e.g.,

    s = "This has an \000embedded NULL character";
    strlen (s) ===> 11
    bstrlen(s) ===> 36
    strcat (s, "foo"); ==> "This has an foo"
    typecast (s, String_Type) ==> "This has an "
    
In S-Lang v2, String_Type objects will be encoded as UTF-8.

I hope this helps.
--John




--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2003 date index] [2003 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]