enum_from_str
Description:
[ Version ( since = "1.2" ) ]
public bool enum_from_str (Type type, string str, out int out_value, out string? err_token)
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
.
Parameters:
type |
the gtype of the enum |
str |
the input string |
out_value |
the output value |
err_token |
location to store the first unrecognized token |
Returns:
true if the conversion was successful, false otherwise |
Namespace: NM.Utils
Package: libnm