mirror of
https://github.com/weechat/weechat.git
synced 2026-07-05 01:03:14 +02:00
api: add regex replace feature in function string_eval_expression
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#ifndef WEECHAT_EVAL_H
|
||||
#define WEECHAT_EVAL_H 1
|
||||
|
||||
#include <regex.h>
|
||||
|
||||
#define EVAL_STR_FALSE "0"
|
||||
#define EVAL_STR_TRUE "1"
|
||||
|
||||
@@ -50,6 +52,13 @@ enum t_eval_comparison
|
||||
EVAL_NUM_COMPARISONS,
|
||||
};
|
||||
|
||||
struct t_eval_regex
|
||||
{
|
||||
const char *result;
|
||||
regmatch_t match[100];
|
||||
int last_match;
|
||||
};
|
||||
|
||||
extern int eval_is_true (const char *value);
|
||||
extern char *eval_expression (const char *expr,
|
||||
struct t_hashtable *pointers,
|
||||
|
||||
Reference in New Issue
Block a user