To write strings directly in a memory file row, use the memory file row replace function, mf_rowrpl():
|
||
|
|
|
|
|
|
|
|
|
Function mf_rowrpl() stores a copy of the passed text string in the memory file. It allocates memory from the heap to hold the copy.
You can use the #defined value APPEND_ROW when using mf_rowrpl() to append a row to a file. When APPEND_ROW is specified for mf_row, the string will be appended after the last non-empty row of the file. If you specify a row in the memory file that is already filled, the string in the call will replace the existing string for that row.
You cannot skip empty rows when filling the memory file with strings using mf_rowrpl(). That is, you must fill rows 0, 1, and 2 before you can write to row 3.