RosettaCodeData/Task/Repeat-a-string/OxygenBasic/repeat-a-string.oxy
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

18 lines
320 B
Text

'REPEATING A CHARACTER
print string 10,"A" 'result AAAAAAAAAA
'REPEATING A STRING
function RepeatString(string s,sys n) as string
sys i, le=len s
if le=0 then exit function
n*=le
function=nuls n
'
for i=1 to n step le
mid function,i,s
next
end function
print RepeatString "ABC",3 'result ABCABCABC