replace with NUL-safe variants; document limitation