This commit is contained in:
Nathan Lebrun
2025-01-29 11:40:30 +01:00
parent 9bce0bf9cb
commit 64100fe0f4
19 changed files with 29 additions and 91 deletions

View File

@@ -0,0 +1,19 @@
#include "tokenizer.h"
char *copy_meta_xor(char *val, int *copied, int rev)
{
int i;
int j;
char *out;
i = 0;
while (is_meta(val[i]) ^ rev)
i++;
*copied = i;
out = malloc(i + 1);
j = -1;
while (++j < i)
out[j] = val[j];
out[i] = 0;
return (out);
}