NAME

findpub - finds a public index named str

SYNOPSIS

oadl::findpub(str)

DESCRIPTION

The findpub() function searches the public symbol table for a symbol matching the name provided in str. If found, it returns the public index associated with that symbol. Public indices are used for dynamic method dispatch, property access, and identifying well-known symbols.

RETURN VALUE

Returns the public index value associated with the name str. If the symbol is not found in the public table, it returns nil.

ERRORS

ArgCheck is thrown if exactly one argument is not provided.
TypeCheck is thrown if str cannot be converted to a string.

EXAMPLE

    v = oadl::findpub("create");
    if (v == public::create) {
        "findpub works!\n";
    }

SEE ALSO

pubname
findobj
objname