extended_data.primitives.matching

This module provides utilities for string and value matching.

It includes functions to partially match strings and to compare non-empty values for equality, handling different data types including strings, mappings, and lists.

Module Contents

Functions

is_partial_match

Checks if two strings partially match.

is_non_empty_match

Checks if two non-empty values match.

API

extended_data.primitives.matching.is_partial_match(a: str | None, b: str | None, check_prefix_only: bool = False) bool

Checks if two strings partially match.

Args: a (str | None): The first string. b (str | None): The second string. check_prefix_only (bool): Whether to check only the prefix.

Returns: bool: True if there is a partial match, False otherwise.

extended_data.primitives.matching.is_non_empty_match(a: Any, b: Any) bool

Checks if two non-empty values match.

Args: a (Any): The first value. b (Any): The second value.

Returns: bool: True if the values match, False otherwise.