ConvUtils.TryStrToConvUnit
From RAD Studio VCL Reference
Contents |
Delphi Information
From ConvUtils.pas
function TryStrToConvUnit(AText: string; out AValue: Double; out AType: TConvType): Boolean;
Unit: ConvUtils
Type: function
Visibility: public
C++ Information
From ConvUtils.hpp
bool __fastcall TryStrToConvUnit(System::UnicodeString AText, double & AValue, unsigned short & AType);
Unit: ConvUtils
Type: function
Description
Parses a string into a value and conversion type.
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.