On 7/21/17 9:44 AM, nmago wrote:
Yes, I needed nsACString copy of data to use it as nsACString argument for
other function.
Assuming "cname" is a char[N] or char*, you should be able to do:
nsCString str(cname, N);
This will make a copy of the first N bytes of cname and add a
null-terminator. No need for allocation, manual memcpy, anything like that.
-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform