Re: String functions with end pointers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



%% Russell Shaw <rjshaw@xxxxxxxxxxxxxxx> writes:

  rs> Your request was unclear but it sounded like you wanted to
  rs> manipulate strings using a pointer to the end rather than the
  rs> start.

Sorry; I thought it was more clear.  strcat() (for example) determines
the end of the string by looking for the nul char.  strncat() determines
the end of the string by either the nul char, or a maximum length.

I'm looking for functions that determine the end of the string by being
provided a pointer to the end of the string.


I suppose I could use strncat() and provide the length as (endp-startp).
But this seems like extra work and I'd need to write a bunch of new
strn*() functions anyway, since most str*() functions don't have a
standard strn*() counterpart anyway.

And, strn*() has some odd behaviors.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@xxxxxxx>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux