18.2.235. PMIx_Check_nspace
PMIx_Check_nspace — Compare two
pmix_nspace_t(5) values for equality
18.2.235.1. SYNOPSIS
#include <pmix.h>
bool PMIx_Check_nspace(const char *key1, const char *key2);
18.2.235.1.1. Python Syntax
No Python equivalent
18.2.235.2. INPUT PARAMETERS
key1: Pointer to the first namespace (typically a pmix_nspace_t(5)) to be compared.key2: Pointer to the second namespace to be compared.
18.2.235.3. DESCRIPTION
Compare two namespaces for equality. The comparison examines at most
PMIX_MAX_NSLEN characters, which is the maximum length a
pmix_nspace_t can hold.
A wildcard match is applied: if either namespace is invalid (NULL or
zero-length, as determined by
PMIx_Nspace_invalid(3)), the two are
treated as matching and the routine returns true. Otherwise the two
strings are compared directly.
18.2.235.4. RETURN VALUE
Returns true if the namespaces are considered equal — that is, if
either namespace is invalid, or if their first PMIX_MAX_NSLEN characters
match. Returns false when both namespaces are valid and differ.
18.2.235.5. NOTES
PMIx_Check_nspace is an OpenPMIx convenience routine and is the backing
implementation of the PMIX_CHECK_NSPACE macro. Because an invalid
namespace is treated as a wildcard, this routine is intended for matching
semantics rather than a strict byte-for-byte equality test.