Memory block.
The subrange that spans all bytes before the null character or $(D_KEYWORD null) if the haystack doesn't contain any.
t { assert(equal(findNullTerminated("abcdef\0gh"), "abcdef")); assert(equal(findNullTerminated("\0garbage"), "")); assert(equal(findNullTerminated("\0"), "")); assert(equal(findNullTerminated("cstring\0"), "cstring")); assert(findNullTerminated(null) is null); assert(findNullTerminated("abcdef") is null
Looks for \0 in the haystack and returns the part of the haystack ahead of it.
Returns $(D_KEYWORD null) if haystack doesn't contain a null character.