Re: about string and character



Joe Wright said:

Willem wrote:

<snip>

Doesn't strlen return the index of the first '\0' in a string ? :-)

No. 'size_t strlen(const char *s);' returns an unsigned integer count of
the number of characters before the terminating nul.

How does that result differ from the index of the first '\0' in a string?

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.



Relevant Pages

  • Re: TEXT
    ... how would you want that to differ with ... Peo Sjoblom "Paul" wrote in message ... > I want to create a string that is always the same length> whether the original value is negative or positive. ... > using =TEXTreturns a string that is 8> characters when positive and 9 characters when negative. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Strange strcmp() action?
    ... "Compares the C string str1 to the C string str2. ... until the characters differ or until a terminanting null-character is ...
    (comp.lang.c)
  • Re: Convert hexadecimal string to binary
    ... characters and extra stuff to make it easier to read, ... what you get from repr() on a binary string. ... Do you actually want a string containing the six printable ... How does it differ from the string ...
    (comp.lang.python)
  • Re: 311983 to 19830101 (YYYYMMDD)
    ... how would that differ from 1 December 1983? ... Could you provide a little refresher on moving four characters to the ... beginning of a string? ... Prev by Date: ...
    (microsoft.public.excel.programming)
  • Re: Prothon should not borrow Python strings!
    ... """It does not make sense to have a string without knowing what encoding ... same cul de sac as Python. ... Prothon_String_As_ASCII // raises error if there are high characters ... Python's split between byte strings and Unicode strings is ...
    (comp.lang.python)