-/* Compare buffer to string length, then compare buffer to fixed string.
- * This ensures two things:
- * - It flags cases where the fixed string is only the start of the
- * buffer, rather than exactly all of it.
- * - It avoids byte comparisons in case the length doesn't match.
+/* Compares a byte buffer (non-NUL terminated) to the payload part of a string,
+ * and returns true iff the buffer (content *and* length) is exactly that
+ * string, without the terminating NUL byte.