Stream: beginners

Topic: String formatting in Roc?


view this post on Zulip Aurélien Geron (Jul 29 2024 at 08:00):

Is there a way to nicely format strings in Roc, similar to C's sprintf()?

view this post on Zulip Luke Boswell (Jul 29 2024 at 08:18):

Are you asking about number formatting? That hasn't been implemented yet.

view this post on Zulip Aurélien Geron (Jul 29 2024 at 08:42):

Thanks again Luke. Yes, I was looking for something like Python's print(f"Day {day:02d}"). I'll survive without it. :smile:


Last updated: Jul 06 2025 at 12:14 UTC