projects
/
python-collate.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Collator.lstripwords: Strip words off the start and append to the end.
[python-collate.git]
/
collate
/
strings.py
diff --git
a/collate/strings.py
b/collate/strings.py
index
487257f
..
16ba8be
100644
(file)
--- a/
collate/strings.py
+++ b/
collate/strings.py
@@
-40,6
+40,8
@@
ROMAN = {
u"\u2188": 100000,
}
+INITIAL_STOPS = frozenset([u"a", u"an", u"the"])
+
def stripends(word):
"""Strip punctuation and symbols from the ends of a string."""
while word and unicodedata.category(word[0])[0] in "PS":