RubyFlow The Ruby and Rails community linklog

fstrings: Powerful formatting strings

Python-alike fstrings allow to use interpolation + formatting tags + custom objects formatting: f"Pi value is {Math::PI = %.3f}, today is {Time.now %Y-%m-%d}" => "Pi value is Math::PI = 3.142, today is 2020-01-08"

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in