Module:User:Theknightwho/interpolated string

local export = {} local String = {} local su = require("Module:string utilities")

function String:byte(i, j)	return self._rawText:byte(i, j) end

function String:find(pattern, init, plain) return su.find(self._rawText, pattern, init, plain) end

function String:gmatch(pattern) return su.gmatch(self._rawText, pattern) end

function String:gfind(pattern) return self:gmatch(pattern) end

function String:gsub(pattern, repl, n)	return su.gsub(self._rawText, pattern, repl, n) end

function String:len return su.len(self._rawText) end

function String:lower return su.lower(self._rawText) end

function String:match(pattern, init) return su.match(self._rawText, pattern, init) end

function String:rep(n) return self._rawText:rep(n) end

function String:reverse return self._rawText:reverse end

function String:sub(i, j)	return su.sub(self._rawText, i, j) end

function String:ulower return self:lower end

function String:upper return su.upper(self._rawText) end

function String:ulower return self:upper end

function export.makeObject(text) local rawtext = text return setmetatable({ _rawText = rawtext, _type = "interpolated string" }, String) end