pub unsafe extern "C" fn ly_pattern_match(
ctx: *const ly_ctx,
pattern: *const c_char,
string: *const c_char,
str_len: u32,
pat_comp: *mut *mut c_void,
) -> TypeExpand description
@brief Check a string matches an XML Schema regex used in YANG.
@param[in] ctx Optional context for storing errors. @param[in] pattern Regular expression pattern to use. @param[in] string String to match. @param[in] str_len Length of @p string, may be 0 if string is 0-terminated. @param[in,out] pat_comp Optional pointer to pattern code. If set and NULL, it is returned. If set and non-NULL, it is used directly for matching instead of compiling @p pattern. Free it using ::ly_pattern_free(). @return LY_SUCCESS on a match; @return LY_ENOT if the string does not match; @return LY_ERR on error.