| @@ -234,6 +234,40 @@ tl_value tl_string_to_lower(tl_ctx *ctx, tl_value a); |
| 234 | 234 | tl_value tl_string_trim(tl_ctx *ctx, tl_value a); |
| 235 | 235 | tl_value tl_string_split(tl_ctx *ctx, tl_value a, tl_value sep); |
| 236 | 236 | tl_value tl_string_parse_int(tl_ctx *ctx, tl_value a); |
| 237 | +tl_value tl_string_join(tl_ctx *ctx, tl_value parts, tl_value sep); |
| 238 | +/* `Bytes` and their builders (runtime/tilrt/src/bytes.rs, builder.rs; ADR |
| 239 | + * 0012). The `append` functions and `build` consume their arguments (they |
| 240 | + * are `owned` externs): a unique builder is updated in place. */ |
| 241 | +tl_value tl_bytes_length(tl_ctx *ctx, tl_value b); |
| 242 | +tl_value tl_bytes_at(tl_ctx *ctx, tl_value b, tl_value i); |
| 243 | +tl_value tl_bytes_slice(tl_ctx *ctx, tl_value b, tl_value start, tl_value end); |
| 244 | +tl_value tl_bytes_concat(tl_ctx *ctx, tl_value a, tl_value b); |
| 245 | +tl_value tl_bytes_concat_all(tl_ctx *ctx, tl_value parts); |
| 246 | +tl_value tl_bytes_eq(tl_ctx *ctx, tl_value a, tl_value b); |
| 247 | +tl_value tl_bytes_compare(tl_ctx *ctx, tl_value a, tl_value b); |
| 248 | +tl_value tl_hash_bytes(tl_ctx *ctx, tl_value b); |
| 249 | +tl_value tl_bytes_debug(tl_ctx *ctx, tl_value b); |
| 250 | +tl_value tl_bytes_from_string(tl_ctx *ctx, tl_value s); |
| 251 | +tl_value tl_bytes_to_string(tl_ctx *ctx, tl_value b); |
| 252 | +tl_value tl_bytes_to_string_lossy(tl_ctx *ctx, tl_value b); |
| 253 | +tl_value tl_bytes_from_list(tl_ctx *ctx, tl_value items); /* panics on a non-byte */ |
| 254 | +tl_value tl_bytes_to_list(tl_ctx *ctx, tl_value b); |
| 255 | +tl_value tl_bytes_builder(tl_ctx *ctx, tl_value capacity); |
| 256 | +tl_value tl_bytes_append(tl_ctx *ctx, tl_value b, tl_value data); |
| 257 | +tl_value tl_bytes_append_string(tl_ctx *ctx, tl_value b, tl_value s); |
| 258 | +tl_value tl_bytes_append_byte(tl_ctx *ctx, tl_value b, tl_value byte); /* panics on a non-byte */ |
| 259 | +tl_value tl_bytes_build(tl_ctx *ctx, tl_value b); |
| 260 | +/* Arrays (runtime/tilrt/src/array.rs; ADR 0014). `set` and `push` consume |
| 261 | + * their arguments (`owned`): a unique array is updated in place. */ |
| 262 | +tl_value tl_array_with_capacity(tl_ctx *ctx, tl_value n); |
| 263 | +tl_value tl_array_length(tl_ctx *ctx, tl_value a); |
| 264 | +tl_value tl_array_from_list(tl_ctx *ctx, tl_value list); |
| 265 | +tl_value tl_array_to_list(tl_ctx *ctx, tl_value a); |
| 266 | +tl_value tl_array_get(tl_ctx *ctx, tl_value a, tl_value i); |
| 267 | +tl_value tl_array_at(tl_ctx *ctx, tl_value a, tl_value i); /* panics out of range */ |
| 268 | +tl_value tl_array_set(tl_ctx *ctx, tl_value a, tl_value i, tl_value x); /* panics out of range */ |
| 269 | +tl_value tl_array_push(tl_ctx *ctx, tl_value a, tl_value x); |
| 270 | +tl_value tl_array_slice(tl_ctx *ctx, tl_value a, tl_value start, tl_value end); |
| 237 | 271 | /* Sockets and HTTP heads (runtime/tilrt/src/net.rs); may park the actor. */ |
| 238 | 272 | tl_value tl_net_listen(tl_ctx *ctx, tl_value host, tl_value port); |
| 239 | 273 | tl_value tl_net_port(tl_ctx *ctx, tl_value listener); |