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[WordStart] - locate the beginning of a word
StringTools[WordEnd] - locate the end of a word
StringTools[WordContaining] - return the word containing a given index
Calling Sequence
WordStart( s, index )
WordEnd( s, index )
WordContaining( s, index )
Parameters
s
-
Maple string
index
integer; a valid index into the string s
Description
The WordStart command returns the index of the beginning (first letter) of the word containing the index index, if any. If the second argument index does not occur in a word in the string s, then the value is returned.
The WordEnd command returns the index of the end (last letter) of the word containing the index index, if any. If the second argument index does not occur in a word in the string s, then the value is returned.
The WordContaining command returns the word containing the index index, if index lies within a word in the string s, or the empty string , otherwise.
For all three commands, the second argument index must be a valid index into the string presented as the first argument.
If the index index lies within a word in the string s, then WordContaining( s, index ) = s[ WordStart( s, index ) .. WordEnd( s, index ) ].
Examples
See Also
string, StringTools, StringTools[Split]
Download Help Document