strunpack()
Description
Create an “unpacked” copy of a string.
Syntax
strunpack(dest[], source[], maxlength);
Parameters
Variable | Input |
|---|---|
| The buffer to store the unpacked string in |
| The string to copy, this may be a packed or an unpacked string |
| The size of |
Returns
The number of characters copied.
Function call example
Example of unpacked line copying
new data1[20];
new array2[20]="oldTextold";
main(){
strunpack(data1, array2, sizeof data1); // result of data1 will be (in ASCII): oldTextold<0><0><0><0><0><0><0><0><0><0> unpacked
while(1){
Delay(100);
}
}Notes and Warnings
This function copies a string from source to dest and stores the destination string in unpacked format.
The source string may either be a packed or an unpacked string.