conversion from string to card