I have example this number: 5032
I want to get this: 5.0.32
How can I do this with ruby string manipulation?
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.
I’d be curious to hear the pros and cons of these different solutions. What’s the fastest ? What’s the clearest ? Are regular expressions expensive ?
Here’s yet another solution:
Here’s our results. Mine is slowest: