move some decoding functions right into the str module, with a bit more