The value_from_formatted_string.py module#

Summary#

from_formatted_string

Convert a value formatted to a specific locale back into an IVariableValue.

Description#

Provides a method for converting a formatted string to a value.

Module detail#

value_from_formatted_string.from_formatted_string(var_type: ansys.tools.variableinterop.variable_type.VariableType, source: str, locale_name: str) ansys.tools.variableinterop.variable_value.IVariableValue#

Convert a value formatted to a specific locale back into an IVariableValue.

Parameters:
var_typeVariableType

The type of variable to convert to.

sourcestr

The string to convert.

locale_namestr

The locale the string was formatted in.

Returns:
IVariableValue

An IVariableValue of the specified type whose value matches the given string.