mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
91f14b07ab
commit
fd17470464
@ -181,7 +181,7 @@ def _make_func(template, name, **kwargs):
|
||||
|
||||
# }}}
|
||||
|
||||
################# The string functions ########################################
|
||||
# ################ The string functions ########################################
|
||||
sort_key = _make_func(_sort_key_template, 'sort_key', collator='_sort_collator', collator_func='sort_collator')
|
||||
|
||||
numeric_sort_key = _make_func(_sort_key_template, 'numeric_sort_key', collator='_numeric_collator', collator_func='numeric_collator')
|
||||
@ -279,10 +279,7 @@ def partition_by_first_letter(items, reverse=False, key=lambda x:x):
|
||||
return ans
|
||||
|
||||
# Return the number of unicode codepoints in a string
|
||||
try:
|
||||
string_length = _icu.string_length if is_narrow_build else len
|
||||
except AttributeError:
|
||||
string_length = len # Somebody running from source with a binary that has not been updated
|
||||
string_length = _icu.string_length if is_narrow_build else len
|
||||
|
||||
################################################################################
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user