Longest common substring: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: changed whitespace.)
Line 1,295: Line 1,295:
<lang Maple>StringTools:-LongestCommonSubString("thisisatest","testing123testing");</lang>
<lang Maple>StringTools:-LongestCommonSubString("thisisatest","testing123testing");</lang>


=={{header|Mathematica}}==
=={{header|Mathematica}}/{{header|Wolfram Language}}==
The function <code>LongestCommonSubsequence</code> returns the longest common substring, and <code>LongestCommonSequence</code> returns the longest common subsequence.
The function <code>LongestCommonSubsequence</code> returns the longest common substring, and <code>LongestCommonSequence</code> returns the longest common subsequence.
<lang Mathematica>Print[LongestCommonSubsequence["thisisatest", "testing123testing"]];</lang>
<lang Mathematica>Print[LongestCommonSubsequence["thisisatest", "testing123testing"]];</lang>