Add functions for splitting strings.

This commit is contained in:
Christoffer Lerno
2022-12-04 23:01:53 +01:00
parent 927ad2001f
commit c15fb7460c
2 changed files with 40 additions and 0 deletions

View File

@@ -15,6 +15,15 @@ macro tconcat(arr1, arr2)
return result;
}
macro index_of(array, element)
{
foreach (i, &e : array)
{
if (*e == element) return i;
}
return SearchResult.MISSING!;
}
macro concat(arr1, arr2)
{
var $Type = $typeof(arr1[0]);