A simple function that converts a string to long