summaryrefslogtreecommitdiff
path: root/lib.c
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-11-29 10:45:17 +0000
committerubq323 <ubq323@ubq323.website>2024-11-29 10:45:17 +0000
commit9a0a4ee19eebc08e5ec3b2d256476016d128b090 (patch)
treeb769535dc915679ae1821393869d7aab693c434d /lib.c
parent83056a82a6d55f7edf2d7216d30000a4a6482310 (diff)
schars-ascii -> sbytesHEADtrunk
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib.c b/lib.c
index 01f5110..33ca58b 100644
--- a/lib.c
+++ b/lib.c
@@ -156,9 +156,9 @@ static Val fn_ssplit(State *S, int nargs, Val *args) {
return VAL_OBJ(out);
}
-static Val fn_schars_ascii(State *S, int nargs, Val *args) {
- CHECK(nargs==1, "need exactly 1 args for schars-ascii");
- CHECK(IS_STRING(args[0]), "need string arg for schars-ascii");
+static Val fn_sbytes(State *S, int nargs, Val *args) {
+ CHECK(nargs==1, "need exactly 1 args for sbytes");
+ CHECK(IS_STRING(args[0]), "need string arg for sbytes");
ObjString *s = AS_STRING(args[0]);
ObjArr *a = objarr_new(S);
for (int i = 0; i < s->len; i++)
@@ -220,7 +220,7 @@ static BuiltinFunc builtin_funcs[] = {
{ "s,@", fn_spendsplat },
{ "ssub?", fn_ssub },
{ "ssplit", fn_ssplit },
- { "schars-ascii", fn_schars_ascii },
+ { "sbytes", fn_sbytes },
{ "sin", fn_sin },
{ "cos", fn_cos },