Next: , Previous: , Up: cpg-bif   [Contents][Index]


12.3.2 SP_atom_length()

Synopsis

#include <sicstus/sicstus.h>

size_t
SP_atom_length(SP_atom atom);

Obtains the length of the encoded string representing a Prolog atom.

Arguments

atom

The atom to inspect.

Return Value

The length if atom is valid, and 0 otherwise.

Description

Same as strlen(SP_string_from_atom(a), but runs in O(1) time.

See Also

Creating and Manipulating SP_term_refs.


Send feedback on this subject.