Reputation: 1241
I have an array of char like this:
char aData[100];
How can I copy only a part of aData from index from to index to in a wxString ?
Is it possible to make, with a wxString as destination and an array of char as source, something like memcpy in C ?
Upvotes: 3
Views: 329
Reputation: 16431
You should be able to do this using the constructor that takes the number of byts to read.
wxString w(aData+from, to-from);
for an already existing w
, you could say
w.assign(aData+from, to-from);
or you could use the iterator version:
w.assign(aData+from, aData+to);
Upvotes: 4