Warcraft III resources & community, 2003–2006 · archived

StringMoveSubString

not rated
Submitted by vjeuxText Parsing0 downloads
Move a substring from a string

ex : StringMoveSubString("The Jass Vault",5,6,8)
return : "The ssJa Vault"
The substring 5,6 (Ja) move to the 8° place of the original string

The steps of function are :
Remove the substring
The ss Vault
Add the substring at x° place
The ssJa Vault

It's not useful but i send it :D

Source

function StringMoveSubString takes string source, integer start, integer end, integer move returns string
    local string new = ""
        set new = SubStringBJ(source,1,start-1) + SubStringBJ(source,end+1,1000)
        return SubStringBJ(new, 1,move - (end - start + 1)) + SubStringBJ(source,start,end) + SubStringBJ(new,move - (end - start + 1)+1,10000)
endfunction

Comments

0

No comments.