Godot: How To Add Commas On Floats Or Integers In GDScript?

How To Add Commas On Floats Or Integers In GDScript?

As of Godot version 3.2.3, GDScript does not have a function that can add commas to floats or integers. So, you need to create a helper function that can process the value and return it as a string with commas.

Below is a code snippet of the method that I use to add commas on floats and integers. I decided to share the function that I use on my projects, with the hope that this will help others as well.


Function For Integers



Function For Floats



-End


Social Media & Contact

Croben Facebook Page
Croben Twitter Page
Croben Youtube Page
Croben Instagram Page
Croben Contact Page

Comments