Add "string" command
This commit is contained in:
parent
56a0390be3
commit
2833dc28b9
@ -186,6 +186,16 @@ void execute(Stack *stack, Stack *originstack, char *modname)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp(NAME, "string"))
|
||||
{
|
||||
for (char *i = ARG; *i != '\0'; i++)
|
||||
stack_push(stack, *i);
|
||||
|
||||
stack_push(stack, strlen(ARG));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Math
|
||||
|
||||
if (!strcmp(NAME, "add"))
|
||||
|
3
tests/string_push.lb
Normal file
3
tests/string_push.lb
Normal file
@ -0,0 +1,3 @@
|
||||
@ 0
|
||||
$string Hello world!
|
||||
dump
|
Loading…
Reference in New Issue
Block a user