Difference between revisions of "Capitalize"

From SCAR Divi Manual
Jump to: navigation, search
(Description)
 
Line 1: Line 1:
 
==Definition==
 
==Definition==
 
<source lang="scar" lines="false">
 
<source lang="scar" lines="false">
function Capitalize(S: AnsiString): AnsiString;
+
function Capitalize(const Str: AnsiString): AnsiString;
 
</source>
 
</source>
  
Line 8: Line 8:
  
 
==Description==
 
==Description==
Capitalizes a [[AnsiString|string]] '''S''' by changing it completely to lower-case and then changing the first letter of each word to upper-case.
+
Capitalizes a [[AnsiString|string]] '''Str''' by changing it completely to lower-case and then changing the first letter of each word to upper-case.
  
 
==Example==
 
==Example==

Latest revision as of 12:45, 18 September 2011

Definition

function Capitalize(const Str: AnsiString): AnsiString;

Availability

SCAR Divi 3.00 > Current

Description

Capitalizes a string Str by changing it completely to lower-case and then changing the first letter of each word to upper-case.

Example

begin
  WriteLn(Capitalize('hello world!'));
end.

Output:

Hello World!

See Also