On 11/17/10 15:14, Vitaly Perov wrote:
On Monday 15 November 2010 17:16:32 Piotr Caban wrote:
On 11/15/10 14:53, Vitaly Perov wrote:
This function should be implemented without memory allocations.
Why? I don't think it is possible to implement it without any memory
allocations.
I mean witho
Vitaly Perov wrote:
> +result = strcoll(nstr1, nstr2);
System strcoll() for strings in different encoding won't work properly.
--
Dmitry.
On Monday 15 November 2010 17:16:32 Piotr Caban wrote:
> On 11/15/10 14:53, Vitaly Perov wrote:
> >> This function should be implemented without memory allocations.
> >
> > Why? I don't think it is possible to implement it without any memory
> > allocations.
>
> I mean without copying the strings.
On 11/15/10 14:53, Vitaly Perov wrote:
This function should be implemented without memory allocations.
Why? I don't think it is possible to implement it without any memory
allocations.
I mean without copying the strings.
Using strcoll doesn't make much sense (here and in MSVCRT_strcoll
implem
Hi,
Thank you very much for your answer!
> strncoll is used to compare at most count characters (you can't access
> data after nullbyte). You're not null terminating nstr1 and nstr2 strings.
>
Yes, I forgott this. Thank you.
> This function should be implemented without memory allocations.
Why? I
Hi,
+char * nstr1 = HeapAlloc(GetProcessHeap(), 0, count + 1);
+char * nstr2 = HeapAlloc(GetProcessHeap(), 0, count + 1);
+
+memcpy(nstr1, str1, count + 1);
strncoll is used to compare at most count characters (you can't access
data after nullbyte). You're not null terminating nstr1