OpenVAS Scanner
21.4.1
|
Functions related to text-related utilities in the NASL functions. More...
#include "nasl_text_utils.h"
#include "../misc/strutils.h"
#include "exec.h"
#include "nasl_debug.h"
#include "nasl_func.h"
#include "nasl_global_ctxt.h"
#include "nasl_lex_ctxt.h"
#include "nasl_tree.h"
#include "nasl_var.h"
#include <ctype.h>
#include <glib.h>
#include <regex.h>
#include <string.h>
#include <unistd.h>
Macros | |
#define | _GNU_SOURCE |
#define | G_LOG_DOMAIN "lib nasl" |
GLib logging domain. More... | |
#define | RAW_STR_LEN 32768 |
#define | NS 16 |
#define | MAX_INT (~(1 << (sizeof (int) * 8 - 1))) |
Functions related to text-related utilities in the NASL functions.
#define _GNU_SOURCE |
#define G_LOG_DOMAIN "lib nasl" |
GLib logging domain.
#define MAX_INT (~(1 << (sizeof (int) * 8 - 1))) |
#define NS 16 |
#define RAW_STR_LEN 32768 |
|
static |
Takes an unnamed string argument and removes any spaces at the end of it. "Space" means white space, vertical or horizontal tabulation, carriage return or line feed.
Does extended regular expression pattern matching.
In NASL, this function returns an array.
Syntax: insstr(s1, s2, i1, i2) or insstr(s1, s2, i1) Insert string s2 into slice [i1:i2] of string s1 and returns the result Warning: returns a CONST_DATA!
str_replace(string: s, find: f, replace: r [,count: n])
Returns index of a substring.
Returning NULL for "not found" is dangerous as automatic conversion to to integer would change it into 0. So we return (-1).
Syntax: substr(s, i1) or substr(s, i1, i2) Returns character from string s starting for position i1 till the end or position i2 (start of string is 0)