RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
ConvUtils.StrToConvUnit Function

Parses a string into a value and conversion type.

Pascal
function StrToConvUnit(AText: string; out AType: TConvType): Double;
C++
Double StrToConvUnit(AnsiString AText, TConvType AType);

ConvUtils

Call StrToConvUnit to reverse the conversion performed by the ConvUnitToStr function. 

AText is the string to parse. It should represent a numeric value followed by the name of a conversion type. For example, '2.5 hours'. 

AType returns the identifier for the conversion type (unit of measurement). 

StrToConvUnit returns the number of units (the numeric portion of the string). 

If AText can't be parsed into a value and conversion type, StrToConvUnit raises an EConversionError exception. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!