strpack()
Description
Create a “packed” copy of a string.
Syntax
strpack(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 copying packed string
new data1[20];
new array2[20]=''oldTextold'';
main(){
strpack(data1, array2, sizeof data1); // result of data1 will be (in ASCII): oldTextold<0><0><0><0><0><0><0><0><0><0> packed string
while(1){
Delay(100);
}
}Notes and Warnings
This function copies a string from source to dest and stores the destination string in packed format. The source string may either be a packed or an unpacked string.