StringTools
IsSubSequence
test whether a string is a subsequence of another string
Calling Sequence
Parameters
Description
Examples
IsSubSequence( s, t )
s
-
string
t
The IsSubSequence(s,t) command returns the value true if s is a subsequence of t and the value false otherwise.
If s is the empty string, the command returns true.
To test whether a string is a substring of another, use StringTools[Search].
All of the StringTools package commands treat strings as (null-terminated) sequences of 8-bit (ASCII) characters. Thus, there is no support for multibyte character encodings, such as unicode encodings.
with⁡StringTools:
IsSubSequence⁡abc,abc
true
IsSubSequence⁡abc,abx
false
IsSubSequence⁡abc,axbyc
See Also
length
StringTools[LongestCommonSubSequence]
StringTools[Search]
Download Help Document