Files
SafeLine/submodule/libct/include/ct/string.h
T
Binbim 3178b8c448 feat: add compiled binaries and stub build system
- Compiled webserver and tcontrollerd for Linux amd64
- Added CGo stubs to build without FVM library
- Added private module stubs (errors, log, settings)
- Added proto stubs for gRPC
- Added install.sh deployment script
- Fixed auth.go type error and TOTP clock skew bypass
2026-07-05 02:46:26 +08:00

28 lines
508 B
C

#ifndef CT_STRING_H
#define CT_STRING_H
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
const char *ptr;
size_t length;
} ct_string_t;
static inline ct_string_t CT_STRING_FROM_PTR_LENGTH(const void *buf, size_t len) {
ct_string_t s;
s.ptr = (const char *)buf;
s.length = len;
return s;
}
static inline ct_string_t CT_STRING_FROM_CSTR(const char *str) {
ct_string_t s;
s.ptr = str;
s.length = str ? strlen(str) : 0;
return s;
}
#endif