1
0
Fork 0
forked from len0rd/rockbox

New tag %ss() which lets you get a substring of another tag.

%ss(start, length, tag) - i.e %ss(0,1,%TL) will get the first letter of the current lines text.
use - for the length to get the rest of the tag (e.g %ss(1,-,%TL) will get everything after the first letter).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30500 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2011-09-11 01:50:06 +00:00
parent 86c543216f
commit 3b9ffd28da
5 changed files with 59 additions and 2 deletions

View file

@ -236,7 +236,8 @@ static const struct tag_info legal_tags[] =
{ SKIN_TOKEN_VAR_SET, "vs", "SSI|I", SKIN_REFRESH_STATIC },
{ SKIN_TOKEN_VAR_GETVAL, "vg", "S", SKIN_REFRESH_DYNAMIC },
{ SKIN_TOKEN_VAR_TIMEOUT, "vl", "S|D", SKIN_REFRESH_DYNAMIC },
{ SKIN_TOKEN_SUBSTRING, "ss", "IiT", SKIN_REFRESH_DYNAMIC },
{ SKIN_TOKEN_UNKNOWN, "" , "", 0 }
/* Keep this here to mark the end of the table */
};

View file

@ -279,6 +279,8 @@ enum skin_token_type {
SKIN_TOKEN_VAR_SET,
SKIN_TOKEN_VAR_GETVAL,
SKIN_TOKEN_VAR_TIMEOUT,
SKIN_TOKEN_SUBSTRING,
};
/*