mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Add functions for splitting strings.
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user