pub fn utils_enum_from_str(
type_: Type,
str: &str,
) -> Option<(i32, Option<GString>)>Available on crate feature
v1_2 only.Expand description
Converts a string to the matching enum value.
If the enum is a G_TYPE_FLAGS the function returns the logical OR of values
matching the comma-separated tokens in the string; if an unknown token is found
the function returns false and stores a pointer to a newly allocated string
containing the unrecognized token in @err_token.
§type_
the GType of the enum
§str
the input string
§Returns
true if the conversion was successful, false otherwise
§out_value
the output value
§err_token
location to store the first unrecognized token