git / brickware / marrow.git - main

(45 minutes ago)commit 7790c99: Meh. Halfway vector implementation. Not happy with the name

tree / slice_fromcstr.c

slice_fromcstr.c

raw

/***
 * slice_fromcstr.c
 */

#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#include "./slice.h"


struct slice
slice_fromcstr(const char *s) {
    struct slice result;

    result.ptr = s;
    result.size = strlen(s);

    return (result);
}