PDA

View Full Version : qmemcpy & qstrcpy



nimsnx
17th May 2011, 20:38
Hello

So far I've been unable to find a Qt version of memcpy. I do see that there is a qstrcpy but I'm looking for qmemcpy.

I don't want to use any platform-specific code (eg, memcpy); I only want to use Qt

What Qt function exists for copying some number of bytes from one void* to another?

As an aside, why is qstrcpy documented with QByteArray rather than with QString?

Thanks

wysota
17th May 2011, 20:44
memcpy() is not platform specific code. It is part of ANSI C, you can safely use it in your code.


As an aside, why is qstrcpy documented with QByteArray rather than with QString?
Because it is not meant to be used with unicode strings such as QString.