I am looking for a method in the FCL similar to Encoding.UTF8.GetString(bytes, index, count)
, but one that does not require a count
argument and instead assumes that the string at the given index is null-terminated.
I am posting my current solution as an answer (see below), but am curious to see whether someone knows of a more elegant or better-performing approach.