if it is adding something to the end, use $left or $right depending on your mood ie $left(text,-1), there is always a way around a problem