NYCPHP Meetup

NYPHP.org

[nycphp-talk] fgets(): why bytes - 1

hans at cyberxdesigns.com hans at cyberxdesigns.com
Wed Mar 2 17:34:44 EST 2005


Silly guess here, but a string in C is an array of characters terminated
with a null.  The null marks the end of the array.  C does not, AFIK, have
a native string type.  I think C just has arrays of characters that are
used as strings.  I remember writing functions to handle arrays of
characters like a string.  Could be total wrong here, been a long while.

Hans


> On Wed, 2 Mar 2005, David Mintz wrote:
>
> Sorry for this typo, so egregious that I think I should correct it:
>
>>
>> because it
>> PHP'wraps  fgets() a C function of the same name which does it that way.
>>
>
> make that "because PHP's gets() wraps a C function..."
>
> ---
> David Mintz
> http://davidmintz.org/
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
>




More information about the talk mailing list