The "not found" return code of the function is (size_t) -1 so yes, it's intentional.