View Single Post
Old 02-24-2023, 02:31 PM   #10
isarl
Addict
isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.
 
Posts: 287
Karma: 2534928
Join Date: Nov 2022
Location: Canada
Device: Kobo Aura 2
Quote:
Originally Posted by Wiggo View Post
I once got this from chaley for the KTE Driver and subtitles after colon. Maybe this will help someone.

Code:
 program:
	v_1 = '';
	list_split($title, ':', 'v');
# Enter v_0 for the text before the colon, v_1 for the text after the colon
# This doesn't work if the title or subtitle part contains extra colons
# v_1 is empty if there are no colons at all
	v_1
https://www.mobileread.com/forums/sh...postcount=2828
This template will split on EVERY colon and return the second part, which might not be the last part like OP was seeking. From the template docs for list_split:

Quote:
split(‘one:two:foo’, ‘:’, ‘var’) is equivalent to var_0 = ‘one’; var_1 = ‘two’; var_2 = ‘foo’
isarl is offline   Reply With Quote