18.2.234. PMIx_Check_key
PMIx_Check_key — Compare a pmix_key_t(5)
against a string for equality
18.2.234.1. SYNOPSIS
#include <pmix.h>
bool PMIx_Check_key(const char *key, const char *str);
18.2.234.1.1. Python Syntax
No Python equivalent
18.2.234.2. INPUT PARAMETERS
key: Pointer to the key (typically a pmix_key_t(5)) to be tested.str: Pointer to the string to compare against.
18.2.234.3. DESCRIPTION
Compare a key against a given string for equality. The comparison examines at
most PMIX_MAX_KEYLEN characters, which is the maximum length a
pmix_key_t can hold. This provides a safe,
bounded way to test whether a key matches an expected attribute string
without risking a read past the end of the fixed-size key array.
18.2.234.4. RETURN VALUE
Returns true if the first PMIX_MAX_KEYLEN characters of key and
str match, and false otherwise.
18.2.234.5. NOTES
PMIx_Check_key is an OpenPMIx convenience routine and is the backing
implementation of the PMIX_CHECK_KEY macro. Both arguments must point to
valid, NULL-terminated strings; the routine performs no NULL checking.