![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Radhe |
for example:
this array:
var array = [1, 4, ‘.’, 0, 0, 0]
into
14.000
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Radhe |
for example:
this array:
var array = [1, 4, ‘.’, 0, 0, 0]
into
14.000
![]() |
Reply From: | jgodfrey |
You’ll probably just need to iterate through the array, convert each element to a string, and concatenate the results. Here’s a function that does basically that:
func array_to_string(arr: Array) -> String:
var s = ""
for i in arr:
s += String(i)
return s
Call it like this:
var array = [1, 4, '.', 0, 0, 0]
var s = array_to_string(array)
print(s)