String Conditions - GenesisCoast/conditions-py GitHub Wiki

Introduction

Conditions

is_null(self)

Checks whether the given value is none

Condition.is_null(self)

is_not_null(self)

Checks whether the given value is NOT none

Condition.is_not_null(self)

is_null_or_empty(self)

Checks whether the given value is none

Condition.is_null_or_empty(self)

is_not_null_or_empty(self)

Checks whether the given value is NOT none

Condition.is_not_null_or_empty(self)

is_null_or_whitespace(self)

Checks whether the given value is none

Condition.is_null_or_whitespace(self)

is_not_null_or_whitespace(self)

Checks whether the given value is NOT none

Condition.is_not_null_or_whitespace(self)

is_shorter_than(self, max_length: int)

Checks whether the given value is shorter in length

Condition.is_shorter_than(self, max_length: int)

is_shorter_or_equal(self, max_length: int)

Checks whether the given value is shorter or equal in length

Condition.is_shorter_or_equal(self, max_length: int)

is_longer_than(self, min_length: int)

Checks whether the given value is longer in length

Condition.is_longer_than(self, min_length: int)

is_longer_or_equal(self, min_length: int)

Checks whether the given value is longer or equal in length

Condition.is_longer_or_equal(self, min_length: int)

has_length(self, length: int)

Checks whether the given value is equal in length to the specified length. An exception is thrown otherwise.

Condition.has_length(self, length: int)

does_not_have_length(self, length: int)

Checks whether the given value is unequal in length to the specified length. An exception is thrown otherwise.

Condition.does_not_have_length(self, length: int)

equals(self, value: str)

Checks whether the given value equals the specified value. An exception is thrown otherwise.

Condition.equals(self, value: str)

does_not_equal(self, value: str)

Checks whether the given value equals the specified value. An exception is thrown otherwise.

Condition.does_not_equal(self, value: str)

starts_with(self, value: str)

Checks whether the given value starts with the specified value. An exception is thrown otherwise.

Condition.starts_with(self, value: str)

does_not_start_with(self, value: str)

Checks whether the given value does not start with the specified value. An exception is thrown otherwise.

Condition.does_not_start_with(self, value: str)

ends_with(self, value: str)

Checks whether the given value ends with the specified value. An exception is thrown otherwise.

Condition.ends_with(self, value: str)

does_not_end_with(self, value: str)

Checks whether the given value does not end with the specified value. An exception is thrown otherwise.

Condition.does_not_end_with(self, value: str)

contains(self, value: str)

Checks whether the given value contains the specified value. An exception is thrown otherwise.

Condition.contains(self, value: str)

does_not_contain(self, value: str)

Checks whether the given value does not contain the specified value. An exception is thrown otherwise.

Condition.does_not_contain(self, value: str)

is_regex_match(self, pattern: str)

Checks wether the given value matches the supplied pattern. An exception is thrown otherwise.

Condition.is_regex_match(self, pattern: str)

is_not_regex_match(self, pattern: str)

Checks whether the given value does not match the supplied pattern. An exception is thrown otherwise.

Condition.is_not_regex_match(self, pattern: str)

is_in_set(self, set: list)

Checks to see if the given value matches any of the values in the supplied set. An exception is thrown otherwise.

Condition.is_in_set(self, set: list)

is_in_set_case_insensitive(self, set: list)

Checks to see if the given value matches any of the values in the supplied set.

Condition.is_in_set_case_insensitive(self, set: list)

is_not_in_set(self, set: list)

Checks to see if the given value matches any of the values is not in the supplied set. An exception is thrown otherwise.

Condition.is_not_in_set(self, set: list)

is_not_in_set_case_insensitive(self, set: list)

Checks to see if the given value matches any of the values is not in the supplied set.

Condition.is_not_in_set_case_insensitive(self, set: list)