From: Bob Hutchison Date: 2002-04-22T22:40:05+09:00 Subject: Re: String sentinels On 4/22/02 12:58 AM, "Yukihiro Matsumoto" wrote: > Hi, > > In message "String sentinels" > on 02/04/21, Bob Hutchison writes: > > |I was looking through the source for String and noticed that there is a > |sentinel (0x00) maintained at the end of each string. I'm wondering if > |anything in Ruby depends on this, or if it depends on the maintained length > |('len') field? > > All string operations are depend on len field. But in some cases, ptr > value is passed directly to the C functions (and system calls) which > may expect NUL termintated string pointer, for example to fopen(3). Thanks, I shouldn't have a problem then. > > matz.