Be the first to rate this file! 141 downloads (last 30 days) File Size: 1.69 KB File ID: #25064

extract substring

by Phillip M. Feldman

 

18 Aug 2009

Code covered by BSD License  

substr extracts a substring of length len from the string str, starting at the specified offset.

Download Now | Watch this File

File Information
Description

substr extracts a substring of length len from the string str, starting at the specified offset. In this version, the first character position has offset 1. (In Acklam's original code, the first character position has offset 0, but this is inconsistent with Matlab conventions). If offset is negative, the position is reckoned by counting backwards from the end of the string. If len is omitted, substr returns everything to the end of the string. If len is negative, substr removes -len characters from the end of the string.

MATLAB release MATLAB 7.7 (R2008b)
Zip File Content  
Other Files license.txt,
substr.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
string Phillip M. Feldman 18 Aug 2009 12:42:27
substring Phillip M. Feldman 18 Aug 2009 12:42:28
substr Phillip M. Feldman 18 Aug 2009 12:42:28
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com