borrowed from functx:chars to make split isbn function use fewer lines of code