You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the library lacks some string trimming functionality. After some experimentation (and even a draft PR 😳), I came up with these code snippets, which I found quite handy (actually it's like .string, but with trimming along the way):
.toDouble is a similar set of helper functions that allows printing a Double value in a specific format (like in the "Race" problem, where it's formatted to 5 decimal places: '40.75740')
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently, the library lacks some string trimming functionality. After some experimentation (and even a draft PR 😳), I came up with these code snippets, which I found quite handy (actually it's like
.string
, but with trimming along the way):I hope this will be useful to someone. Or maybe the maintainers will even include something like this into the library's codebase 😊
Usage example (inspired by the "Race" sample problem):
.toDouble
is a similar set of helper functions that allows printing aDouble
value in a specific format (like in the "Race" problem, where it's formatted to 5 decimal places: '40.75740')Beta Was this translation helpful? Give feedback.
All reactions