Killmaster
Jan 25 2005, 16:18
$puts(The,$if3(%split%,%album artist%,%artist%,Unknown Artist))
$if($stricmp($left($get(The),4),'the'),$substr($get(The),5,$len($get(The)))', The',$get(The))
I'm using this in the Album List Panel. I want it to remove the "The" on either %split%, %album artist%, or %artist% tags, then reattach it to the end. While the string works, however, it doesn't remove the "the" from those things? Any thoughts? It seems straightforward enough, all it should do is check for each one when it processes the data.
upNorth
Jan 25 2005, 16:29
The first I can see is that you compare the first 4 characters of the variable The to the 3 letter word 'the'.
I'll test your code now...
Edit: Yeah, that's it. I would suggest you add a space to your test string 'the' ('the '), so that you actually compare it to a four letter string. That way you also avoid messing up artists like "Them Mushrooms".
Edit: Minor rewrite x2 as Firefox crashed...
Killmaster
Jan 25 2005, 16:37
doh!
That's what I get for c&p code..