# String formatting? (ex. ints, space-padded, width = 3)

**URL:** <https://community.haxe.org/t/string-formatting-ex-ints-space-padded-width-3/2229>\
**Category:** Haxe\
**Created:** [January 25, 2020, 7:24am UTC](https://community.haxe.org/t/string-formatting-ex-ints-space-padded-width-3/2229 "2020-01-25T07:24:33Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![RealyUniqueName](https://community.haxe.org/user_avatar/community.haxe.org/realyuniquename/32/10_2.png) [@RealyUniqueName](https://community.haxe.org/u/RealyUniqueName)\
**Post date:** [January 25, 2020, 11:50am UTC](https://community.haxe.org/t/string-formatting-ex-ints-space-padded-width-3/2229/4 "2020-01-25T11:50:42Z")

</div>

Offtopic: `Math.floor(Math.random() * 500)` is the same as `Std.random(500)` and `'$value'` (or `"" + value`) is usually faster than `Std.string(value)` for numeric types 😉

---

_[View the full topic](https://community.haxe.org/t/string-formatting-ex-ints-space-padded-width-3/2229)._
