Author Topic: Capitalize first letter of string  (Read 857 times)

/title

the input could possibly already be capitalized so just converting to ascii and adding, etc, etc isn't the way to go

any preloaded functions or resources already written?

%Str = strUpr(getSubStr(%Str, 0, 1)) @ getSubStr(%Str, 1, strLen(%Str));

Takes the first character of the string, converts it to uppercase, then appends the rest of the string on the end.

%Str = strUpr(getSubStr(%Str, 0, 1)) @ getSubStr(%Str, 1, strLen(%Str));

Takes the first character of the string, converts it to uppercase, then appends the rest of the string on the end.
yeah i knew this way of doing it, was just seeing if there was any already created function in the engine

yeah i knew this way of doing it, was just seeing if there was any already created function in the engine

For something as specific as capitalizing the first letter in a string?  I wouldn't except that.

For a complete list of static functions, you can enter dumpconsolefunctions();

For something as specific as capitalizing the first letter in a string?  I wouldn't except that.

For a complete list of static functions, you can enter dumpconsolefunctions();

too used to complete programming libraries, it's been a while since i've worked in depth with torque

too used to complete programming libraries, it's been a while since i've worked in depth with torque

Here's a small string library: http://dl.dropboxusercontent.com/u/12906062/blocklande/libstr.cs By Clockturn.