Did you know ... | Search Documentation: |
![]() | Pack arithmetic_types -- prolog/type_stringy.pl |
This module implements a set of functions on string types including strings and atoms. The only exported predicate is the type checking stringy/1 which is true is its argument is a string or atom. Block-like indexing and slicing which construct substrings, are equivalent to similar opertions on lists.
The set of stringy
arithmetic functions defined by this module include:
:- arithmetic_function(string/1). % term to string conversion :- arithmetic_function([]/1). % indexing (char) and slicing (substring) :- arithmetic_function([]/2). :- arithmetic_function(\\ /2). % concat :- arithmetic_function(string_length/1). % "builtin", no code required :- arithmetic_function(find/2). % find a substring (like Python)
See the ReadMe for this pack for more documentation and examples.
stringy
, i.e., a string or atom; otherwise fails.