Difference between revisions of "Left"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function Left(Text: AnsiString; Count: Integer): AnsiString; </source> ==Availability== SCAR Divi 3.00 > Current ==Description...")
 
 
Line 1: Line 1:
 
==Definition==
 
==Definition==
 
<source lang="scar" lines="false">
 
<source lang="scar" lines="false">
function Left(Text: AnsiString; Count: Integer): AnsiString;
+
function Left(const Str: AnsiString; const Len: Integer): AnsiString;
 
</source>
 
</source>
  
Line 8: Line 8:
  
 
==Description==
 
==Description==
Returns a part of the given [[AnsiString|string]] '''Text''' starting at the left side of the string with a length specified by '''Count'''.
+
Returns a part of the given [[AnsiString|string]] '''Str''' starting at the left side of the string with a length specified by '''Len'''.
  
 
==Example==
 
==Example==

Latest revision as of 11:43, 18 September 2011

Definition

function Left(const Str: AnsiString; const Len: Integer): AnsiString;

Availability

SCAR Divi 3.00 > Current

Description

Returns a part of the given string Str starting at the left side of the string with a length specified by Len.

Example

begin
  WriteLn(Left('Hello World!', 5));
end.

Output:

Hello

See Also