HEX
Server: Apache
System: Linux pdx1-shared-a2-09 6.6.116-grsec-jammy-dirty #1 SMP Sat Nov 8 00:02:42 UTC 2025 x86_64
User: dh_pvsc7i (5084578)
PHP: 8.1.31
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