If you're using FFI and the proc accepts cstring type, you don't even need to 
convert string to cstring at all:
    
    
    proc printf(formatstr: cstring) {.importc: "printf", varargs, header: 
"<stdio.h>".}
    printf("This works %s", "as expected")
    

Reply via email to