About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/strtrans.tm.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 strtrans Context: slangrtl

Synopsis

Replace characters in a string

Syntax

String_Type strtrans (str, old_set, new_set)

Description

   String_Type str, old_set, new_set;

The strtrans function may be used to replace all the characters from the set old_set with the corresponding characters from new_set in the string str. If new_set is empty, then the characters in old_set will be removed from str. This function returns the result.

Example

    str = strtrans (str, "A-Z", "a-z");   % lower-case str
    str = strtrans (str, "^0-9", " ");    % Replace anything but 0-9 by space
Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.