Add stringarray_to_array function

Why did I not add this before...?
This commit is contained in:
JeremyStar™ 2024-03-24 22:59:57 +01:00
parent 26af587ac1
commit 7e9574f10f
2 changed files with 10 additions and 0 deletions

View file

@ -48,3 +48,5 @@ func _ready() -> void:
Converts an array into a string array.
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.

View file

@ -71,3 +71,11 @@ func array_to_stringarray(array: Array) -> Array[String]:
output.append(item)
return output
func stringarray_to_array(array: Array[String]) -> Array:
var output: Array = []
for item in array:
output.append(item)
return output