value_set_from_string


Description:


public bool value_set_from_string (Value value, string as_string, Type type)

Stores the value data from its string representation as type.

The accepted formats are: <itemizedlist> <listitem><para>G_TYPE_BOOLEAN: a caseless comparison is made with "true" or "false"</para></listitem> <listitem><para>numerical types: C locale format (dot as a fraction separator)</para> </listitem> <listitem><para>G_TYPE_DATE: see <link linkend="gda-parse-iso8601-date"> parse_iso8601_date</link></para></listitem> <listitem ><para>GDA_TYPE_TIME: see <link linkend="gda-parse-iso8601-time"> parse_iso8601_time</link></para></listitem> <listitem ><para>GDA_TYPE_TIMESTAMP: see <link linkend="g-date-time-new-iso8601"> DateTime.from_iso8601</link></para>< /listitem> </itemizedlist>

This function is typically used when reading configuration files or other non-user input that should be locale independent.

Parameters:

value

a Value that will store val.

as_string

the stringified representation of the value.

type

the type of the value

Returns:

true if the value has been converted to type from its string representation; it not means that the value is converted successfully, just that the transformation is available. false otherwise.


Namespace: Gda
Package: libgda-6.0