Difference between revisions of "GetNumbers"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function GetNumbers(Text: AnsiString): AnsiString; </source> ==Availability== SCAR Divi 3.00 > Current ==Description== Removes...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Definition== | ==Definition== | ||
<source lang="scar" lines="false"> | <source lang="scar" lines="false"> | ||
− | function GetNumbers( | + | function GetNumbers(const Str: AnsiString): AnsiString; |
</source> | </source> | ||
Line 8: | Line 8: | ||
==Description== | ==Description== | ||
− | Removes all characters that are not numbers from a [[AnsiString|string]] ''' | + | Removes all characters that are not numbers from a [[AnsiString|string]] '''Str''' and returns it. |
==Example== | ==Example== | ||
<source lang="scar"> | <source lang="scar"> | ||
begin | begin | ||
− | WriteLn(GetNumbers('1Hello | + | WriteLn(GetNumbers('1Hello 2World!3')); |
end. | end. | ||
</source> | </source> |
Latest revision as of 16:23, 17 September 2011
Definition
function GetNumbers(const Str: AnsiString): AnsiString;
Availability
SCAR Divi 3.00 > Current
Description
Removes all characters that are not numbers from a string Str and returns it.
Example
begin WriteLn(GetNumbers('1Hello 2World!3')); end.
Output:
123