mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 06:07:11 -05:00
Decks: methods to normalize name and check equality of name
This commit is contained in:
parent
3d6c0ec36c
commit
e44b049278
1 changed files with 8 additions and 0 deletions
|
|
@ -600,3 +600,11 @@ class DeckManager:
|
|||
|
||||
def isDyn(self, did):
|
||||
return self.get(did)['dyn']
|
||||
|
||||
@staticmethod
|
||||
def normalizeName(name):
|
||||
return unicodedata.normalize("NFC", name.lower())
|
||||
|
||||
@staticmethod
|
||||
def equalName(name1, name2):
|
||||
return DeckManager.normalizeName(name1) == DeckManager.normalizeName(name2)
|
||||
|
|
|
|||
Loading…
Reference in a new issue