X-Git-Url: https://git.korewanetadesu.com/?p=python-collate.git;a=blobdiff_plain;f=collate%2F_abcollator.py;h=99866c36cac82698313be7c3237ddc3052a6843c;hp=71f5f54631a42e8c33ac1945b57ff92066bc0496;hb=f73c4c6cd3ed326c5735ab33a6896697227d07e3;hpb=08e8f0a8bb8d7276d114087f8ff8dbce4acdb1cf diff --git a/collate/_abcollator.py b/collate/_abcollator.py index 71f5f54..99866c3 100644 --- a/collate/_abcollator.py +++ b/collate/_abcollator.py @@ -2,3 +2,10 @@ class Collator(object): def cmp(self, string1, string2): """Return negative if a < b, zero if a == b, positive if a > b.""" return cmp(self.key(string1), self.key(string2)) + + def words(self, string): + """Split the string into separate words. + + This split is done using Unicode's definition of whitespace. + """ + return string.split()