Trimming text from a tag |
This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.
See also: Hydrogenaudio Terms of Service.
![]() ![]() |
Trimming text from a tag |
Oct 2 2011, 02:37
Post
#1
|
|
|
Group: Members Posts: 5 Joined: 3-February 06 Member No.: 27507 |
Tying to trim the text within the parenthesis (xxxxxxxx)
or.......move it to the second line. I've tried following the text formatting examples on the wiki, but I'm missing something. ![]() |
|
|
|
Oct 2 2011, 03:23
Post
#2
|
|
|
Group: Members Posts: 6 Joined: 22-March 11 Member No.: 89211 |
I use this one, it accounts for the rare cases were %field% starts with a '(':
$ifgreater($strchr(%field%,'('),0,$left(%field%,$sub($strchr(%field%,'('),2)),%field%) The simpler version is: $left(%field%,$sub($strchr(%field%,'('),2)) By the way, it appears that you are using $strchr(%field%,')'), thus the undesired result. |
|
|
|
Oct 2 2011, 03:33
Post
#3
|
|
|
Group: Members Posts: 5 Joined: 3-February 06 Member No.: 27507 |
sorry, probably need some further explaining.
the text in question is formatted as such $tab()%title%$tab()$char(10) the parenthesis test is part of the title. I'm using the item detail window This post has been edited by smb: Oct 2 2011, 03:36 |
|
|
|
Oct 2 2011, 03:45
Post
#4
|
|
|
Group: Members Posts: 6 Joined: 22-March 11 Member No.: 89211 |
Try
$tab()$left(%title%,$sub($strchr(%title%,'('),2))$tab()$char(10) |
|
|
|
Oct 2 2011, 03:50
Post
#5
|
|
|
Group: Members Posts: 5 Joined: 3-February 06 Member No.: 27507 |
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 08:57 |