Code for use in Cstring base conversions.