Warcraft III resources & community, 2003–2006 · archived

ucfirst

not rated
Submitted by 0siris[GoE]Text Parsing0 downloads
ucfirst(string str)

Returns a string with the first character of str capitalized, if that character is alphabetic.

Example:
set udg_foo = "hello world!"
set udg_foo = ucfirst(udg_foo) // Hello world!

Source

function ucfirst takes string str returns string
    return (StringCase(SubStringBJ(str, 1, 1), true) + SubStringBJ(str, 2, StringLength(str)))
endfunction

Comments

0

No comments.