n-str: func  [
c [char! string!]
n [integer!]
/local
 s
][
either char? c [
 s: to-string c
][
 s: c
]
return head insert/dup copy "" s n
]

>> n-str "t" 3
== "ttt"

>> n-str "tab" 3
== "tabtabtab"

>> n-str tab 3
== "^-^-^-"

>> n-str #"t" 3
== "ttt"


n-tab: func  [
n [integer!]
][[integer!]
return n-str tab n
]


-galt


Reply via email to