FormIt C++ API  v23.0.0 (2023.0.0)
FormIt::StringConversion API

Description

Functions

FORMIT_CORE_EXPORT::string FormIt::StringConversion::LinearValueToString (double val, bool forceFeetOrMeter=false)
 Convert a linear value to a string. More...
 
FORMIT_CORE_EXPORT::pair< bool, double > FormIt::StringConversion::StringToLinearValue (1::string const &str, bool forceFeetOrMeter=false)
 Convert a string to a linear value. More...
 
FORMIT_CORE_EXPORT::string FormIt::StringConversion::AreaValueToString (double val, bool includeUnitsAndThousandsSeparators=false, unsigned int decimalPlaces=2, bool forceFeetOrMeter=false)
 Convert an area value to a string. More...
 
FORMIT_CORE_EXPORT::pair< bool, double > FormIt::StringConversion::StringToAreaValue (1::string const &str, bool forceFeetOrMeter=false)
 Convert a string to an area value. More...
 
FORMIT_CORE_EXPORT::string FormIt::StringConversion::VolumeValueToString (double val, bool includeUnitsAndThousandsSeparators=false, unsigned int decimalPlaces=2, bool forceFeetOrMeter=false)
 Convert a volume value to a string. More...
 
FORMIT_CORE_EXPORT::pair< bool, double > FormIt::StringConversion::StringToVolumeValue (1::string const &str, bool forceFeetOrMeter=false)
 Convert a string to a volume value. More...
 

Function Documentation

FORMIT_CORE_EXPORT ::string FormIt::StringConversion::AreaValueToString ( double  val,
bool  includeUnitsAndThousandsSeparators = false,
unsigned int  decimalPlaces = 2,
bool  forceFeetOrMeter = false 
)

Convert an area value to a string.

If forceFeetOrMeter is true, the string will always be formatted as square feet or meter

Parameters
[in]val
[in]includeUnitsAndThousandsSeparators
[in]decimalPlaces
[in]forceFeetOrMeter
FORMIT_CORE_EXPORT ::string FormIt::StringConversion::LinearValueToString ( double  val,
bool  forceFeetOrMeter = false 
)

Convert a linear value to a string.

If forceFeetOrMeter is true, the string will always be formatted as feet or meter

Parameters
[in]val
[in]forceFeetOrMeter
FORMIT_CORE_EXPORT ::pair<bool, double> FormIt::StringConversion::StringToAreaValue ( 1::string const &  str,
bool  forceFeetOrMeter = false 
)

Convert a string to an area value.

If forceFeetOrMeter is true, the value will always be interpreted as feet or meter, unless it contains an explicit unit. For example "2" will be 2 square feet, whereas "2 sq in" will remain 2 square inches Returns true in the pair first, if succesful, and the converted value in the pair second

Parameters
[in]str
[in]forceFeetOrMeter
FORMIT_CORE_EXPORT ::pair<bool, double> FormIt::StringConversion::StringToLinearValue ( 1::string const &  str,
bool  forceFeetOrMeter = false 
)

Convert a string to a linear value.

If forceFeetOrMeter is true, the value will always be interpreted as feet or meter, unless it contains an explicit unit. For example "2" will be 2 feet, whereas "2 in" will remain 2 inches Returns true in the pair first, if succesful, and the converted value in the pair second

Parameters
[in]str
[in]forceFeetOrMeter
FORMIT_CORE_EXPORT ::pair<bool, double> FormIt::StringConversion::StringToVolumeValue ( 1::string const &  str,
bool  forceFeetOrMeter = false 
)

Convert a string to a volume value.

If forceFeetOrMeter is true, the value will always be interpreted as cubic feet or meter, unless it contains an explicit unit. For example "2" will be 2 cubic feet, whereas "2 cu in" will remain 2 cubic inches Returns true in the pair first, if succesful, and the converted value in the pair second

Parameters
[in]str
[in]forceFeetOrMeter
FORMIT_CORE_EXPORT ::string FormIt::StringConversion::VolumeValueToString ( double  val,
bool  includeUnitsAndThousandsSeparators = false,
unsigned int  decimalPlaces = 2,
bool  forceFeetOrMeter = false 
)

Convert a volume value to a string.

If forceFeetOrMeter is true, the string will always be formatted as square feet or meter

Parameters
[in]val
[in]includeUnitsAndThousandsSeparators
[in]decimalPlaces
[in]forceFeetOrMeter