Returning a string from rust
Hi again @nielstermeer,
I got around to exploring RustMex again, but found myself struggling with something as simple as returning a string (I expect the MATLAB type would be a char array). This is likely also down to my limited experience with Rust as a language. Do you have an example returning a string from Rust to MATLAB/Octave?
So far I believe I need to:
- Place an
MxArray
with the string in theLhs
object usingreplace
But I am not sure how to construct the MxArray from a string (or CString)
Once again, thank you for your work on RustMex
Edited by Jeppe Klitgaard