Suppose I have a variable of type Int = 08, how can I convert this to String keeping the leading zero?
For instance:
v :: Int v = 08 show v
Output: 8
I want the output to be ’08’.
Is this possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depending on what you are planning to do you might want to store the ’08’ as a string and only convert to int when you need the value.