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[CommonPrefix] - return the length of the longest common prefix of two strings
StringTools[CommonSuffix] - return the length of the longest common suffix of two strings
Calling Sequence
CommonPrefix( s1, s2 )
CommonSuffix( s1, s2 )
Parameters
s1
-
Maple string
s2
Description
The CommonPrefix(s1, s2) command returns the length of the longest common prefix of its input strings, s1 and s2.
The actual common prefix can be obtained by indexing into either of the strings, s1 or s2, with the range 1 .. CommonPrefix( s1, s2 ).
Note: String t is a prefix of string s if , for some integer , or t is the empty string. For example, the prefixes of the string "abc" are "", "a", "ab", and "abc".
The CommonSuffix(s1, s2) function returns the length of the longest common suffix of its input strings, s1 and s2.
This function can be defined, in terms of CommonPrefix and Reverse as
Examples
See Also
string, StringTools, StringTools[IsPrefix], StringTools[IsSuffix], StringTools[Reverse]
Download Help Document