View Single Post
Old 09-14-2022, 07:04 AM   #93
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
New function strcmpcase

14 Sept 2022 (in calibre 6.5.0)
  • New function strcmpcase()
    Code:
    strcmpcase(x, y, lt, eq, gt)
    does a case-sensitive lexical comparison of x and y. Returns lt if x < y, eq if x == y, otherwise gt.

    Note: This is NOT the default behavior used by calibre, for example, in the lexical comparison operators (==, >, <, etc.). This function could cause unexpected results, preferably use ``strcmp()`` whenever possible.

    Thanks to @un_pogaz for this function.

Last edited by chaley; 09-16-2022 at 12:12 PM.
chaley is offline   Reply With Quote