Re: Defacto standard string library
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Fri, 02 Jan 2009 16:05:23 -0800
user923005 <dcorbit@xxxxxxxxx> writes:
On Jan 2, 3:31 pm, jameskuyper <jameskuy...@xxxxxxxxxxx> wrote:
user923005 wrote:
On Jan 2, 1:36 pm, Stephen Sprunk <step...@xxxxxxxxxx> wrote:...
If you only concatenate one valid string to another, it's not an issue.
If that is all you need to do, then use mem* functions and not str*
functions and there will be less trouble.
But then you'll have to search for, or at least keep track of, the
location of the terminating null byte,
If we are only ever concatenating, then this piece of math is rather
trivial.
And strcat() does it.
in order to tell the mem*
functions how much data to move around or compare. What advantages do
you perceive to using the mem* functions rather than the corresponding
str* functions for this purpose?
The str* functions don't work properly and the mem* functions do.
No, the str* functions work just fine.
Actually, I see no advantage in using mem* functions other than
possibly not trying something that I should not be trying.
I would never use standard C library functions to localize when ICU is
available. It's utter insanity.
Ok, ICU might be the greatest thing since sliced bread; perhaps I'll
take a look at it. That doesn't alter the fact that C's str*
functions *can* be used with UTF-8 strings. They don't, of course, do
everything, but what they do, they do correctly (assuming you use them
correctly).
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.
- Follow-Ups:
- Re: Defacto standard string library
- From: Bartc
- Re: Defacto standard string library
- From: user923005
- Re: Defacto standard string library
- References:
- Re: Defacto standard string library
- From: Phil Carmody
- Re: Defacto standard string library
- From: Keith Thompson
- Re: Defacto standard string library
- From: user923005
- Re: Defacto standard string library
- From: Stephen Sprunk
- Re: Defacto standard string library
- From: user923005
- Re: Defacto standard string library
- From: jameskuyper
- Re: Defacto standard string library
- From: user923005
- Re: Defacto standard string library
- Prev by Date: Re: Defacto standard string library
- Next by Date: Re: Defacto standard string library
- Previous by thread: Re: Defacto standard string library
- Next by thread: Re: Defacto standard string library
- Index(es):
Relevant Pages
|