1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 09:49:05 +00:00

Move string utility functions to stringaux.lua

This commit is contained in:
dmiller
2018-10-18 01:08:19 +00:00
parent 39cfbdf4e2
commit 0500811f5a
140 changed files with 521 additions and 418 deletions

View File

@@ -3,6 +3,7 @@ local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local stringaux = require "stringaux"
local table = require "table"
local tableaux = require "tableaux"
@@ -83,11 +84,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