Char substring, not String substring

Yes

just a note to add that the '0' initialisation of the subString is important otherwise subString would likely not be properly terminated with the null char after the strncpy.

1 Like