Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
StringTools[Take] - extract a prefix from a string
StringTools[Drop] - remove a prefix from a string
Calling Sequence
Take( s, len )
Drop( s, len )
Parameters
s
-
Maple string
len
non-negative integer; length of prefix to extract or remove
Description
The Take(s, len) command returns the prefix of length len from string s.
If s has at least len characters, then the substring of s consisting of the first len characters of s is returned. That is, the string is returned. If s has length less than len, then s is returned.
The Drop(s, len) command removes the prefix of length len from string s.
If the length of s is greater than or equal to len, then the string is returned. If the length of s is less than len, then an empty string is returned.
Take and Drop satisfy the equation
for all non-negative integers n.
Examples
See Also
cat, seq, string, StringTools, StringTools[IsPrefix], StringTools[Join], StringTools[Split], StringTools[SubString]
Download Help Document