Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
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