3,314
回編集
編集の要約なし |
編集の要約なし |
||
2行目: | 2行目: | ||
function p.hundred(frame) | function p.hundred(frame) | ||
if frame.args[3] then | if frame.args[3] then | ||
if string.find(frame.args[1],frame.args[2]) then | |||
a,b = string.find(frame.args[1],frame.args[2]) | |||
m = string.char(string.byte(frame.args[1],a,b)) | |||
n = a == 1 and "" or string.char(string.byte(frame.args[1],1,a-1)) | |||
o = b == #frame.args[1] and "" or string.char(string.byte(frame.args[1],b+1,#frame.args[1])) | |||
return n..string.rep(m,100)..o | return n..string.rep(m,100)..o | ||
else | else | ||
12行目: | 13行目: | ||
return string.rep(m,100) | return string.rep(m,100) | ||
end | end | ||
else | else | ||
if frame.args[2] then | if frame.args[2] then | ||
if string.find(frame.args[1],frame.args[2]) then | if string.find(frame.args[1],frame.args[2]) then | ||
a,b = string.find(frame.args[1],frame.args[2]) | |||
m = string.char(string.byte(frame.args[1],a,b)) | |||
n = a == 1 and "" or string.char(string.byte(frame.args[1],1,a-1)) | n = a == 1 and "" or string.char(string.byte(frame.args[1],1,a-1)) | ||
o = b == #frame.args[1] and "" or string.char(string.byte(frame.args[1],b+1,#frame.args[1])) | o = b == #frame.args[1] and "" or string.char(string.byte(frame.args[1],b+1,#frame.args[1])) | ||
return n..string.rep(m,100)..o | return n..string.rep(m,100)..o | ||
else | else | ||
m = frame.args[1] | |||
return string.rep(m,100) | return string.rep(m,100) | ||
end | end | ||
else | else | ||
m = frame.args[1] | |||
return string.rep(m,100) | return string.rep(m,100) | ||
end | end |
回編集