StrToTEA

From SCAR Divi Manual
Revision as of 11:31, 30 April 2012 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> function StrToTEA(const Str: string): TExtArray; </source> ==Availability== SCAR Divi 3.34 > Current ==Description== Converts ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

function StrToTEA(const Str: string): TExtArray;

Availability

SCAR Divi 3.34 > Current

Description

Converts a string matching/containing the regex \d+ to a TExtArray. The regex allows for a lot of flexibility when it comes to the format of the entered string. The TExtArray can be converted back to a string with TEAToStr.

Example

begin
  WriteLn(TEAToStr(StrToTEA('1,2.8,3')));
  WriteLn(TEAToStr(StrToTEA('Hello1.7,2.1,3World')));
  WriteLn(TEAToStr(StrToTEA('1 ,2E8 3')));
  WriteLn(TEAToStr(StrToTEA('1e9a2b3')));
end.

Output:

1,2.8,3
1.7,2.1,3
1,200000000,3
1000000000,2,3

See Also