superleaf.operators.string#
Functions
|
Predicate calling a method by name, e.g. |
|
Operator calling a method by name, e.g. |
- superleaf.operators.string.str_op(method: str, *args, **kwargs) Operator[source]#
Operator calling a method by name, e.g.
str_op("lower")(s) == s.lower().- Parameters:
method (str) – Name of the method to call on the input.
*args – Positional arguments passed to the method.
**kwargs – Keyword arguments passed to the method.
- Returns:
The operator.
- Return type:
- superleaf.operators.string.str_bool_op(method: str, *args, **kwargs) BooleanOperator[source]#
Predicate calling a method by name, e.g.
str_bool_op("isdigit")(s) == s.isdigit().- Parameters:
method (str) – Name of the method to call on the input.
*args – Positional arguments passed to the method.
**kwargs – Keyword arguments passed to the method.
- Returns:
The predicate.
- Return type: