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 don't think it is possible to implement it without any memory allocations.