Skip to content

mdz_ansi_alg_compare

Maksym Dzyubenko edited this page Oct 6, 2024 · 4 revisions

Compare content of string with pcItems. If penError is not NULL, error will be written there

enum mdz_ansi_compare_result mdz_ansi_alg_compare(
  const char* pcData,
  size_t nDataSize,
  size_t nLeftPos,
  const char* pcItems,
  size_t nCount,
  mdz_bool bPartialCompare,
  enum mdz_error* penError);

Parameter Description
pcData pointer to string
nDataSize Size of pcData
nLeftPos 0-based start position to compare from left. Use 0 to compare from the beginning of string
pcItems items to compare. Cannot be NULL
nCount number of items to compare. Cannot be 0
bPartialCompare if mdz_true compare only nCount items, otherwise compare full strings
penError if not NULL, error will be written there. There are following errors possible:
Value Description
MDZ_ERROR_LICENSE license is not initialized using mdz_ansi_alg_init() or invalid
MDZ_ERROR_DATA pcData is NULL
MDZ_ERROR_SIZE Size is 0 (empty string)
MDZ_ERROR_ITEMS pcItems is NULL
MDZ_ERROR_ZERO_COUNT nCount is 0
MDZ_ERROR_BIG_LEFT nLeftPos >= Size
MDZ_ERROR_BIG_COUNT nLeftPos + nCount > Size
MDZ_ERROR_NONE function succeeded
Return Description
MDZ_COMPARE_EQUAL or MDZ_COMPARE_NONEQUAL Result of comparison
mdz_ansi_alg API Reference is generated using mdzApiRefGenerator.