#error: expected type '[]const u8', found '[*:0]const u8'

1 messages · Page 1 of 1 (latest)

night stratus
#

I am trying to convert the following slice to enum ```cpp
const interface = std.meta.stringToEnum(EventInterfaces, global_event.interface);

neat granite
#

[*:0]const u8: pointer to an unknown number of u8 terminated by a 0
[:0]const u8: pointer to an known number of u8 terminated by a 0
you can use std.mem.span(global_event.interface) to scan for the 0 terminator and turn an unknown length into a known length

night stratus
#

oh

#

let me try

#

yeah sorted thank you