lq-text: LQU_StringToNameRef

API t_NameRef LQU_StringToNameRef (theNameSpace, theName) t_NameSpace *theNameSpace; char *theName;

Purpose

Treats the given `theName' string as a Name, and looks this up in the given NameSpace. If the NameSpace allows nested NameSpace references, the Name is allowed to have any number of prefixes consisting of a name followed by a dot; the name must be the name of a NameSpace in the NameSpace being searched, and in this case the search proceeds using the newly found NameSpace on the rest of the string.

Returns

the NameRef, or NULL

See Also:

Example

If given the string `Children.Boys.Simon', and a NameSpace called `People', LQU_StringToNameRef will search `People' for a NameSpace called Children, and if that should succeed, it will then search `Children' for a NameSpace called `Boys'. If this last search succeeds, the namespace `Boys' is searched for `Simon', and the result, either the NameRef called `Simon' or NULL for failure, is returned.