Ahelp: substr - CIAO 3.4 - Chandra X-Ray Observatory (CXC)
Ahelp: substr - CIAO 3.4 - Chandra X-Ray Observatory (CXC)
Ahelp: substr - CIAO 3.4 - Chandra X-Ray Observatory (CXC)
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Ahelp</strong>: <strong>substr</strong> − <strong>CIAO</strong> <strong>3.4</strong><br />
URL: http://cxc.harvard.edu/ciao<strong>3.4</strong>/<strong>substr</strong>.tm.html<br />
Last modified: December 2006<br />
AHELP for <strong>CIAO</strong> <strong>3.4</strong> <strong>substr</strong> Context: slangrtl<br />
Jump to: Description Example See Also<br />
Synopsis<br />
Extract a <strong>substr</strong>ing from a string<br />
Syntax<br />
String_Type <strong>substr</strong> (String_Type s, Integer_Type n, Integer_Type len)<br />
Description<br />
The <strong>substr</strong> function returns a <strong>substr</strong>ing with length len of the string s beginning at position n. If len is −1, the<br />
entire length of the string s will be used for len. The first character of s is given by n equal to 1.<br />
Example<br />
<strong>substr</strong> ("To be or not to be", 7, 5);<br />
returns "or no"<br />
In many cases it is more convenient to use array indexing rather than the <strong>substr</strong> function. In fact,<br />
<strong>substr</strong>(s,i+1,strlen(s)) is equivalent to s[[i:]].<br />
See Also<br />
slangrtl<br />
array_map, bstrlen, extract_element, getenv, init_char_array, is_list_element, is_<strong>substr</strong>, length, strlen,<br />
strncmp, strreplace, strsub, time<br />
The <strong>Chandra</strong> X−<strong>Ray</strong> Center (<strong>CXC</strong>) is operated for NASA by the Smithsonian<br />
Astrophysical <strong>Observatory</strong>.<br />
60 Garden Street, Cambridge, MA 02138 USA.<br />
Smithsonian Institution, Copyright © 1998−2006. All rights reserved.<br />
URL:<br />
http://cxc.harvard.edu/ciao<strong>3.4</strong>/<strong>substr</strong>.tm.html<br />
Last modified: December 2006<br />
<strong>substr</strong> 1
<strong>Ahelp</strong>: <strong>substr</strong> − <strong>CIAO</strong> <strong>3.4</strong><br />
2 <strong>substr</strong>