rep
Definition
-- @/=[C]:-1
function rep(...)
Callers
@/lua/common/extensions/ui/improfiler.lua
fmtv = "%"..n.."d | %s\n"
fmtn = (" "):rep(n).." | %s\n"
end
@/lua/ge/extensions/tech/capturePlayer.lua
local char = string.char(value)
sensorData:put(string.rep(char, 3))
sensorData:put(alpha)
@/lua/console/bananabench-xml.lua
indent = indent or 0
str = string.rep(" ", indent).."<"..self.name
for k,v in pairs(self.attribs) do
if not self.value then
str = str..string.rep(" ", indent)
end
@/lua/ge/map.lua
local numOfLanes = numOfLanesFromRadius(rad1, rad2)
lanes = string.rep("+", numOfLanes)
else
if rules.rightHandDrive then
lanes = string.rep("+", numOfLanes)..string.rep("-", numOfLanes)
else
if rules.rightHandDrive then
lanes = string.rep("+", numOfLanes)..string.rep("-", numOfLanes)
else
else
lanes = string.rep("-", numOfLanes)..string.rep("+", numOfLanes)
end
else
lanes = string.rep("-", numOfLanes)..string.rep("+", numOfLanes)
end
-- if oneWay then
-- lanes = ('+'):rep(max(1, road.lanesRight))
-- else
-- else
-- lanes = ('-'):rep(road.lanesLeft or 0)..('+'):rep(road.lanesRight or 0) -- max(1, road.lanesLeft), max(1, road.lanesRight)
-- end
-- else
-- lanes = ('-'):rep(road.lanesLeft or 0)..('+'):rep(road.lanesRight or 0) -- max(1, road.lanesLeft), max(1, road.lanesRight)
-- end
if rules.rightHandDrive then
lanes = ('+'):rep(lanesLeft)..('-'):rep(lanesRight)
else
if rules.rightHandDrive then
lanes = ('+'):rep(lanesLeft)..('-'):rep(lanesRight)
else
else
lanes = ('-'):rep(lanesLeft)..('+'):rep(lanesRight)
end
else
lanes = ('-'):rep(lanesLeft)..('+'):rep(lanesRight)
end
-- if oneWay then
-- lanes = ('+'):rep(max(1, lanesRight))
-- else
-- else
-- lanes = ('-'):rep(max(1, lanesLeft))..('+'):rep(max(1, lanesRight))
-- end
-- else
-- lanes = ('-'):rep(max(1, lanesLeft))..('+'):rep(max(1, lanesRight))
-- end
if rules.rightHandDrive then
lanes = ('+'):rep(lanesLeft)..('-'):rep(lanesRight)
else
if rules.rightHandDrive then
lanes = ('+'):rep(lanesLeft)..('-'):rep(lanesRight)
else
else
lanes = ('-'):rep(lanesLeft)..('+'):rep(lanesRight)
end
else
lanes = ('-'):rep(lanesLeft)..('+'):rep(lanesRight)
end
@/lua/vehicle/extensions/profiling/p.lua
fmtv = "%"..n.."d | %s\n"
fmtn = (" "):rep(n).." | %s\n"
end
@/lua/common/jit/p.lua
fmtv = "%"..n.."d | %s\n"
fmtn = (" "):rep(n).." | %s\n"
end
@/lua/common/libs/slaxml/slaxdom.lua
local out = {}
local tab = opts.indent and (type(opts.indent)=="number" and string.rep(" ",opts.indent) or opts.indent) or ""
local ser = {}
depth = depth or 0
table.insert(out, tab:rep(depth)..''..n.name..' '..n.value..'?>')
end
depth = depth or 0
local indent = tab:rep(depth)
local name = n.nsPrefix and n.nsPrefix..':'..n.name or n.name
if n.cdata then
table.insert(out, tab:rep(depth)..'')
else
else
table.insert(out, tab:rep(depth)..esc(n.value))
end
function ser.comment(n,depth)
table.insert(out, tab:rep(depth)..'')
end
@/lua/common/jbeamWriter.lua
lvl = lvl or 1
local indent = string.rep(' ', lvl)
local indentPrev = string.rep(' ', max(0, lvl - 1))
local indent = string.rep(' ', lvl)
local indentPrev = string.rep(' ', max(0, lvl - 1))
local tmp = {}
@/lua/ge/extensions/util/export.lua
-- if not gltfRoot.nodes[luaIndex] then
-- log("E", logTag, string.rep(" ", i).. "invalid node "..dbgNodeName(gltfRoot,nodeId))
-- return
-- if tableContains(parentNode ,nodeId) then
-- log("E", logTag, string.rep(" ", i).. "already parented or looping tree!!! "..dbgNodeName(gltfRoot,nodeId))
-- return
-- end
-- log("I", logTag, string.rep(" ", i).. dbgNodeName(gltfRoot,nodeId))
-- table.insert(parentNode, nodeId)
if fourByteAlignPaddingSize(#jsonContent) > 0 then
f:write(string.rep(" ", fourByteAlignPaddingSize(#jsonContent))) --JSON padding
end
if fourByteAlignPaddingSize(totalBinBufSize) > 0 then
f:write(string.rep(string.char(0), fourByteAlignPaddingSize(totalBinBufSize))) --BIN padding
end
@/lua/common/libs/LuLPeg/lulpeg.lua
if "string" == type( v ) then
v = s_gsub( v, "\n", "\n" .. (" "):rep( indent * multiplier + str_indent ) )
if s_match( s_gsub( v,"[^'\"]",""), '^"+$' ) then
if "string" == type( k ) and s_match( k, "^[_%a][_%a%d]*$" ) then
acc[#acc+1] = s_gsub( k, "\n", (" "):rep( indent * multiplier + 1 ) .. "\n" )
else
function cdata_to_str(v, acc, indent)
acc[#acc+1] = ( " " ):rep( indent * multiplier )
acc[#acc+1] = "["
acc[#acc+1] = "\n"
acc[#acc+1] = (" "):rep(indent * multiplier + 2)
end
local str_indent = 1
acc[#acc+1] = (" "):rep((indent + 1) * multiplier)
key_to_str( k, acc, indent + 1)
end
acc[#acc+1] = ( " " ):rep( indent * multiplier )
acc[#acc+1] = "}"
if dbg then -------------
print(("-"):rep(30))
print(pt.pkind)
"return{ [0]=false",
(", false"):rep(upper),
" }"
n = tostring(n)
n = n .."."..((" "):rep(4 - #n))
return n
padnum(n),
padding:rep(indent),
caps.kind[ci],
padnum(n),
padding:rep(indent), kind,
": start = ", start,
padnum(n),
padding:rep(indent),
"/", kind,
@/lua/common/utils.lua
s = tostring(s)
return string.rep(c, l - #s)..s
end
s = tostring(s)
return s .. string.rep(c, l - #s)
end
local size = min(len, floor(abs(v)))
return '['..string.rep(v>0 and "+" or "-", size) .. string.rep(' ', len - size)..']'
end
local size = min(len, floor(abs(v)))
return '['..string.rep(v>0 and "+" or "-", size) .. string.rep(' ', len - size)..']'
end
lvl = lvl or 1
local indent = string.rep(' ', lvl)
local indentPrev = string.rep(' ', max(0, lvl - 1))
local indent = string.rep(' ', lvl)
local indentPrev = string.rep(' ', max(0, lvl - 1))
local tmp = {}
end
print(hex .. string.rep(" ", 8 - len % 8 ) .. asc)
end
@/lua/vehicle/ve_utils.lua
function saveCompiledJBeamRecursive(f, data, level)
local indent = string.rep(" ", level * 2)
local nl = true
if type(data) == "table" and type(data["partPath"]) == "string" and data["partPath"] ~= "" then
f:write("\n" .. indent .. "/*" .. string.rep("*", 50) .. "\n")
f:write(indent .. " * part " .. tostring(data["partPath"]) .. "\n")
f:write(indent .. " * part " .. tostring(data["partPath"]) .. "\n")
f:write(indent .. " *" .. string.rep("*", 49) .. "*/\n")
f:write("\n" .. indent)
@/lua/vehicle/ai.lua
local numOfLanes = numOfLanesFromRadius(mapData.radius[fromNode], mapData.radius[toNode])
lanes = string.rep("+", numOfLanes)
else
if mapmgr.rules.rightHandDrive then
lanes = string.rep("+", numOfLanes)..string.rep("-", numOfLanes)
else
if mapmgr.rules.rightHandDrive then
lanes = string.rep("+", numOfLanes)..string.rep("-", numOfLanes)
else
else
lanes = string.rep("-", numOfLanes)..string.rep("+", numOfLanes)
end
else
lanes = string.rep("-", numOfLanes)..string.rep("+", numOfLanes)
end
numOfInLanes = numOfInLanes + thisEdgeInLanes
centerRange = string.rep("+", thisEdgeInLanes)..centerRange
local radius = thisEdgeInLanes * defaultLaneWidth * 0.5
local radius = thisEdgeInLanes * defaultLaneWidth * 0.5
centerRange = centerRange..string.rep("+", thisEdgeInLanes)
latXnorm = latXnorm - radius
@/lua/common/libs/luaqrcode/qrencode.lua
if count_to_pad > 0 then
data = data .. string.rep("0",count_to_pad)
end
missing_digits = 8 - math.fmod(#data,8)
data = data .. string.rep("0",missing_digits)
end
end
arranged_data = arranged_data .. string.rep("0",remainder[version])
local tab = get_matrix_with_lowest_penalty(version,ec_level,arranged_data)
@/lua/common/libs/inspect/inspect.lua
function Inspector:tabify()
self:puts(self.newline, string.rep(self.indent, self.level))
end
@/lua/vehicle/controller/tech/roadsSensor.lua
local numOfLanes = numOfLanesFromRadius(mapmgr.mapData.radius[inNode], mapmgr.mapData.radius[outNode])
lanes = string.rep("+", numOfLanes)
else
if mapmgr.rules.rightHandDrive then
lanes = string.rep("+", numOfLanes)..string.rep("-", numOfLanes)
else
if mapmgr.rules.rightHandDrive then
lanes = string.rep("+", numOfLanes)..string.rep("-", numOfLanes)
else
else
lanes = string.rep("-", numOfLanes)..string.rep("+", numOfLanes)
end
else
lanes = string.rep("-", numOfLanes)..string.rep("+", numOfLanes)
end
@/lua/common/libs/LuaIRC/init.lua
print(indent.."["..pos.."] => "..tostring(t).." {")
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
print(indent..string.rep(" ",string.len(pos)+6).."}")
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
print(indent..string.rep(" ",string.len(pos)+6).."}")
elseif (type(val)=="string") then
@/lua/common/utils/filterchain.lua
local function getGenerator(arg)
return 'return function(self,' .. commonFilterArgumentsStr ..'...) return ' .. s .. arg .. string.rep(')', #filterlist) .. ' end'
end
@/lua/common/libs/lua-luaepnf/epnf.lua
end
local marker = string.rep( " ", p-sol ) .. "^"
print( n..":"..lno..": "..msg)
@/lua/ge/extensions/ui/console.lua
return dump .. hex
.. string.rep( " ", 8 - len % 8 ) .. asc
end
@/lua/common/json-ast.lua
elseif nodeType == 'space' then
return string.rep(' ', node[2])
elseif nodeType == 'tab' then
elseif nodeType == 'tab' then
return string.rep('\t', node[2])
elseif nodeType == 'string' then
@/lua/common/jsonPrettyEncoderCustom.lua
_levelPath = _levelPath or ''
local indent = string.rep(' ', lvl)
local indentPrev = string.rep(' ', math.max(0, lvl - 1))
local indent = string.rep(' ', lvl)
local indentPrev = string.rep(' ', math.max(0, lvl - 1))
local tmp = {}
@/lua/common/jbeam/slotSystem.lua
local source = deepcopy(source_raw)
--log('I', "jbeam.unifyParts",string.rep(" ", level).."* merging part "..tostring(source.partName).."{".. tostring(source) .. "}["..dumps(source.slotType).."] => "..tostring(target.partName).." ["..tostring(target.slotType).."] ... ")
-- walk and merge all sections