#u8 to c_str

1 messages · Page 1 of 1 (latest)

mossy hornet
#

I am new to zig and currently doing it like

const MODEL_PATH = [_:0]c_ushort{
    'm', 'o', 'd', 'e', 'l', '/', 'm', 'o', 'd', 'e', 'l', '.', 'o', 'n', 'n', 'x', 0,
};

is there anyway to do it without looking like this ?

rapid silo
uneven lily
#

if you need it to be an array value instead of a pointer to an array, you can do "model/model.onnx".*

mossy hornet
#

onnxruntime asks for something equivalent to c++ "".c_str()

rapid silo
mossy hornet
#

YAY yup

#

thanks , it works