Home Wrap fractional part of decimal in a span
Reply: 0

Wrap fractional part of decimal in a span

user441
1#
user441 Published in May 22, 2018, 12:28 am

I am printing a variable (called something.price) to a Haml template and its value is a string representation of a decimal with 2-digit precision. I want to wrap the fractional part of the decimal (including the .) in a span.

Example: If we have "1234.41", we want to wrap the span around the .41 part. How can this be achieved?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.305442 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO