Add docblocks for str and encoding