Difference between revisions of "StrToBoxDef"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function StrToBoxDef(const Str: string; const Default: TBox): TBox; </source> ==Availability== SCAR Divi 3.37 > Current ===...") |
(No difference)
|
Latest revision as of 14:15, 26 November 2012
Definition
function StrToBoxDef(const Str: string; const Default: TBox): TBox;
Availability
SCAR Divi 3.37 > Current
Notes
- Before 3.38, the function had some flexibility issues with the input.
Description
Converts a given string Str to a TBox. If the given string is not in an acceptable format, the function will return the box given by Default.
Example
begin WriteLn(BoxToStr(StrToBoxDef('1,2,3,4', Box(4, 3, 2, 1)))); WriteLn(BoxToStr(StrToBoxDef('1,2 ,3, 4', Box(4, 3, 2, 1)))); WriteLn(BoxToStr(StrToBoxDef('1,2 ,3, 4)', Box(4, 3, 2, 1)))); WriteLn(BoxToStr(StrToBoxDef('(1,2 ,3, 4)', Box(4, 3, 2, 1)))); WriteLn(BoxToStr(StrToBoxDef('(1,2,3,4)', Box(4, 3, 2, 1)))); WriteLn(BoxToStr(StrToBoxDef('(1 2 3 4)', Box(4, 3, 2, 1)))); end.
Output:
(1,2,3,4) (1,2,3,4) (1,2,3,4) (1,2,3,4) (1,2,3,4) (4,3,2,1)