lets say I have the string,

"00ffffBob Dylan - ff00ffBlood on the Tracks"

and I wanted the first 26 characters. I would do,

$substr(00ffffBob Dylan - ff00ffBlood on the Tracks,1,26)

but it would return

00ffffBob Dylan - ff0

which would display

Bob Dylan - ff0

instead of

Bob Dylan - Blood on the T

In this case the last bit would be a truncated color code. Is there an easy around this? Perhaps one of the many undocumented functions?


edit: bah, I meant color codes in the title