Warcraft III resources & community, 2003–2006 · archived

rPad

not rated
Submitted by Aiursrage2kFunctions0 downloads
Padds the string with the desired spacer
Example: call rPad("fish","a",7) //output: fishaaa

Source

function rPad takes string input, string buffer, integer sz returns string
    local integer i = StringLength(input)-1
    if i < sz then
      loop
        exitwhen i > sz
        set input = input + buffer
        set i = i + 1
      endloop
    endif
    return input
endfunction

Comments

0

No comments.