Parses a string into a value and conversion type.
function TryStrToConvUnit(AText: string; out AValue: Double; out AType: TConvType): Boolean;
Boolean TryStrToConvUnit(AnsiString AText, Double AValue, TConvType AType);
ConvUtils
Call TryStrToConvUnit 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'.
AValue returns the number of units (the numeric value in the string).
AType returns the identifier for the conversion type (unit of measurement).
TryStrToConvUnit returns true if AText can be converted, false otherwise.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|