sitelogo
atom_length/2

unifies the number of the characters of an atom.

atom_length(+Atom, -Number)

atom_length/2 unifies Number with the number of characters of Atom.

Arguments

Atom                   atom
Number                 integer >= 0

Examples

atom_length('this is quite a long text', N). Succeeds with substitution N <- 25
atom_length('four', 4). Succeeds.
atom_length('five', 5). Fails.

Standard

This predicate is part of the ISO-Prolog Standard.

See also

atom_chars/2, atom_codes/2, atom_concat/3, atom_length/2, char_code/2, number_chars/2, number_codes/2, parse_atom/2/3, sub_atom/5.


Up read on...
scroll to top managed with ubiCMS