Warcraft III resources & community, 2003–2006 · archived

StringTrimLeft

not rated
Submitted by PepparText Parsing0 downloads
Removes all spaces at the beginning of string s.

Source

function StringTrimLeft takes string s returns string
    local integer i = 0
    local string c
    if s == null or s == "" then
        return s
    endif
    loop
        set c = SubString( s, i, i + 1 )
        exitwhen c == ""
        if c != " " then
            return SubString( s, i, 65535 )
        endif
        set i = i + 1
    endloop
    return ""
endfunction

Comments

0

No comments.