Regex.escapeNul

Escapes the nul characters in string to "\x00". It can be used to compile a regex with embedded nul characters.

For completeness, length can be -1 for a nul-terminated string. In this case the output string will be of course equal to string.

class Regex
static
string
escapeNul
(
string string_
,
int length
)

Parameters

string_ string

the string to escape

length int

the length of string

Return Value

Type: string

a newly-allocated escaped string

Meta

Since

2.30