Add stringarray_to_array function
Why did I not add this before...?
This commit is contained in:
parent
26af587ac1
commit
7e9574f10f
2 changed files with 10 additions and 0 deletions
|
@ -48,3 +48,5 @@ func _ready() -> void:
|
||||||
Converts an array into a string array.
|
Converts an array into a string array.
|
||||||
|
|
||||||
If an item is found that is not of type `String`, an empty array is returned.
|
If an item is found that is not of type `String`, an empty array is returned.
|
||||||
|
### *Array* <u>stringarray_to_array</u>(*Array[String]* array)
|
||||||
|
Converts a string array into an array.
|
||||||
|
|
|
@ -71,3 +71,11 @@ func array_to_stringarray(array: Array) -> Array[String]:
|
||||||
output.append(item)
|
output.append(item)
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
func stringarray_to_array(array: Array[String]) -> Array:
|
||||||
|
var output: Array = []
|
||||||
|
|
||||||
|
for item in array:
|
||||||
|
output.append(item)
|
||||||
|
|
||||||
|
return output
|
||||||
|
|
Loading…
Reference in a new issue