Go to the source code of this file.
◆ nasl_chomp()
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.
◆ nasl_crap()
◆ nasl_display()
◆ nasl_egrep()
looks for a pattern in a string, line by line.
- NASL Function: egrep\n
- NASL Named Parameters:\n
- string String to search the pattern in
- pattern the patern that should be matched
- icase case insensitive flag
- rnul replace the null char in the string. Default TRUE.
- NASL Returns:\n The concatenation of all lines that match. Null otherwise.
- Parameters
-
| [in] | lexic | Lexical context of NASL interpreter. |
◆ nasl_ereg()
Matches a string against a regular expression.
- NASL Function: egrep\n
- NASL Named Parameters:\n
- string String to search the pattern in
- pattern the patern that should be matched
- icase case insensitive flag
- rnul replace the null char in the string. Default TRUE.
- multiline Is FALSE by default (string is truncated at the first âend of lineâ), and can be set to TRUE for multiline search.
- NASL Returns:\n The first found pattern.
- Parameters
-
| [in] | lexic | Lexical context of NASL interpreter. |
◆ nasl_ereg_replace()
Search for a pattern in a string and replace it.
- NASL Function: ereg_replace\n
- NASL Named Parameters:\n
- string String to search the pattern in
- pattern patern to search in the string for
- replace string to replace the pattern with
- icase case insensitive flag
- rnul replace the null char in the string. Default TRUE.
- NASL Returns:\n The new string with the pattern replaced with replace
- Parameters
-
| [in] | lexic | Lexical context of NASL interpreter. |
◆ nasl_eregmatch()
Does extended regular expression pattern matching.
- NASL Function: eregmatch\n
- NASL Unnamed Parameters:\n
- pattern An regex pattern
- string A string
- icase Boolean, for case sensitve
- find_all Boolean, to find all matches
- rnul replace the null char in the string. Default TRUE.
- NASL Returns:\n An array with the first match (find_all: False)
- or an array with all matches (find_all: TRUE). NULL or empty if no match was found.
- Parameters
-
| [in] | lexic | Lexical context of NASL interpreter. |
◆ nasl_hex()
◆ nasl_hexstr()
◆ nasl_insstr()
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!
◆ nasl_int()
◆ nasl_match()
◆ nasl_ord()
◆ nasl_rawstring()
◆ nasl_split()
◆ nasl_str_replace()
str_replace(string: s, find: f, replace: r [,count: n])
◆ nasl_strcat()
◆ nasl_stridx()
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).
- Returns
- -1 if string not found, otherwise index of substring.
- See also
- strstr
◆ nasl_string()
◆ nasl_strlen()
◆ nasl_strstr()
◆ nasl_substr()
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)
◆ nasl_tolower()
◆ nasl_toupper()