subchars/[4,5]
subchars/[4,5]
are identical to substring/[4,5]
(lib-txp-sub-substring)
except that the second argument, B, is a list of
character codes, not a text object.
subchars(
+ABC,
?B,
?LenA,
?LenB,
?LenC)
subchars(
+ABC,
?B,
?LenA,
?LenB)
| ?- subchars(frederica, Name, 4, 4). Name = "eric"
These predicates avoid constructing an atom that you may have no further use for.