Did you know ... | Search Documentation: |
Pack onepointfour_basics -- prolog/stringy_length.pl |
This is not really needed a atom_length/2 and string_length/2 work for both strings and atoms, but it removes the specificity of calling atom_length/2 or string_length/2.
Length may be instantiated to a integer. In that case, the predicate verifies the length of Stringy against Length.
This predicates behaves softly, i.e. preferentially fails on bad input.
hard
will make the predicate throw if Length is bound but negative.atom
or string
.hard
will make the predicate throw if Type is bound but not one
of string
, atom
(and also if Length is bound but negative).