[ Strings and Atoms | Reference Manual | Alphabetic Index ]

sub_string(+String, ?Before, ?Length, ?After, ?SubString)

Succeeds if SubString is a substring of String, with length Length, preceded by Before, and followed by After characters
String
String.
Before
Integer (from 0 upwards) or variable.
Length
Integer (from 0 upwards) or variable.
After
Integer (from 0 upwards) or variable.
SubString
String or variable.

Description

This is a compatibility alias for substring/5.

Modes and Determinism

Fail Conditions

String cannot be split into substrings of the required lengths, or SubString does not occur within String

See Also

substring / 5