diff options
| author | 2024-01-26 15:05:59 +0800 | |
|---|---|---|
| committer | 2024-01-26 15:05:59 +0800 | |
| commit | 06a746a2d425fe575fb84b89ba156e3e8af5e827 (patch) | |
| tree | 634325daf1d2cadfdedcf5dcde249c0cfe64595e /src | |
| parent | 0250c8373c8ea12c6d12cf399a15c57f8690b032 (diff) | |
| parent | 8dd7d3fe24acdbb7f52aa245f5f44991f3a44f46 (diff) | |
| download | infini-06a746a2d425fe575fb84b89ba156e3e8af5e827.tar.gz infini-06a746a2d425fe575fb84b89ba156e3e8af5e827.zip | |
:sparkles: feat(output): add new Endswith router
Diffstat (limited to 'src')
| -rw-r--r-- | src/infini/router.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/infini/router.py b/src/infini/router.py index a520a456..1174721e 100644 --- a/src/infini/router.py +++ b/src/infini/router.py @@ -1,6 +1,3 @@ -from infini.typing import overload - - class Router: sign: str @@ -19,3 +16,8 @@ class StartswithRouter(Router): class ContainsRouter(Router): def match(self, input: str) -> bool: return self.sign in input.strip() + + +class Endswith(Router): + def match(self, input: str) -> bool: + return input.strip().endswith(self.sign) |
