mirror of
https://github.com/nmap/nmap.git
synced 2025-12-21 06:59:01 +00:00
Move string utility functions to stringaux.lua
This commit is contained in:
@@ -4,6 +4,7 @@ local dns = require "dns"
|
||||
local base32 = require "base32"
|
||||
local nmap = require "nmap"
|
||||
local string = require "string"
|
||||
local stringaux = require "stringaux"
|
||||
local table = require "table"
|
||||
local tableaux = require "table"
|
||||
local rand = require "rand"
|
||||
@@ -103,11 +104,11 @@ local function remove_empty(t)
|
||||
end
|
||||
|
||||
local function split(domain)
|
||||
return stdnse.strsplit("%.", domain)
|
||||
return stringaux.strsplit("%.", domain)
|
||||
end
|
||||
|
||||
local function join(components)
|
||||
return stdnse.strjoin(".", remove_empty(components))
|
||||
return table.concat(remove_empty(components, "."))
|
||||
end
|
||||
|
||||
-- Remove the first component of a domain name. Return nil if the number of
|
||||
|
||||
Reference in New Issue
Block a user