View Single Post
Old 03-17-2012, 11:20 AM   #3
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,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Agama View Post
Can I add some code to either strip out spaces or convert them to hyphens?
Using single function mode:
Code:
Strip spaces: {title_sort:.8:re( ,)}
Convert spaces to hyphens: {title_sort:.8:re( ,-)}
Using template program mode:
Code:
Strip spaces: {title_sort:.8:'re($, ' ' ,'')'}
Convert spaces to hyphens: {title_sort:.8:'re($, ' ' ,'-')'}
or
Code:
Strip spaces: {title_sort:'shorten(re($, ' ' ,''), 8, '', 0)'}
Convert spaces to hyphens: {title_sort:'shorten(re($, ' ' ,'-'), 8, '', 0)'}
Using general program mode:
Code:
Strip spaces: program: shorten(re(field('title_sort'), ' ', ''), 8, '', 0)
Convert spaced to hyphens: program: shorten(re(field('title_sort'), ' ', '-'), 8, '', 0)
and so on.
chaley is offline   Reply With Quote