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[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