HEX
Server: Apache
System: Linux iad1-shared-b8-33 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User: samfetchero1 (10301780)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/include/yara/simple_str.h
#ifndef _SIMPLESTR_H
#define _SIMPLESTR_H

#include <yara/types.h>

/* Simple dynamic string implementation for more readable/maintainable code
   Can be further optimized */
typedef struct _SIMPLE_STR
{
  uint32_t len;
  uint32_t cap;
  char* str;
} SIMPLE_STR, *PSIMPLE_STR;

SIMPLE_STR* sstr_new(const char* s);
SIMPLE_STR* sstr_newf(const char* fmt, ...);
void sstr_free(SIMPLE_STR* ss);
bool sstr_appendf(SIMPLE_STR* ss, const char* fmt, ...);
char* sstr_move(SIMPLE_STR* ss);

#endif