I have a C API looks like following:
int enumDataFormat(char ***SampleNames);
Swift Code:
------------------------------------------------------------------
var formats = UnsafeMutablePointer<UnsafeMutablePointer<Int8>>.alloc(1)
let count = enumDataFormat(&formats)
for index in 0..<count {
//Question in here: I don't known how to obtin the string in memory
}
Objective-C Code: It is working very well
------------------------------------------------------------------
char **formats;
int count = enumDataFormat(&formats);
if (count > 0) {
for (int i = 0; i < count; i++) {
//obtain the string from memory
char *formatString = *(formats + i);
NSLog(@"%s", formatString);
}
}