Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
StringTools[LongestCommonSubString] - return the longest common substring of two strings
StringTools[LongestCommonSubSequence] - return the longest common subsequence of two strings
Calling Sequence
LongestCommonSubString( s1, s2 )
LongestCommonSubSequence( s1, s2 )
Parameters
s1
-
Maple string
s2
Description
A substring of a string is a contiguous sequence of the characters appearing in . The empty string is a substring of every string. A subsequence of a string is a sequence of characters from , which may not be contiguous in . Every substring of is a subsequence of . For example, is a substring of , and is a subsequence of which is not a substring.
The LongestCommonSubString(s1, s2) command returns from its input strings, s1 and s2, a common substring of maximum length.
Many common substrings of maximum length may exist. Which among the candidates is returned depends upon the suffix structure of the pair of strings, but is deterministic.
The LongestCommonSubSequence(s1, s2) command is similar, but searches for subsequences of the pair of input strings rather than substrings.
Examples
See Also
string, StringTools, StringTools[CommonPrefix], StringTools[CommonSuffix], StringTools[Levenshtein]
Download Help Document