QMChange() |
![]() ![]() ![]() |
The QMChange() function replaces occurrences of one substring with another in a string.
Format
where
The QMChange() function returns a new string with the specified substrings replaced.
One use of QMChange() is to replace mark characters with carriage return / line feed pairs when transferring data from a dynamic array to a multi-line text box.
Note that in the C API library, a statement of the form rec = QMChange(rec, old, new, 0, 0) will return a pointer to a newly allocated memory area, overwriting the rec pointer. The old memory is not freed by this call and it is therefore necessary to retain a pointer to the original rec string so that it can be freed later. |