Chris Beaumont's IDL Library

Download source code

single page | use frames     summary     class     fields     routine details     file attributes




result = strtrun(string, search)

This function removes the last section from a string

Return value

A string scalar or array, containing the portion of the input strings occuring before the search string.


string in required

A string scalar or array to truncate

search in required

A search string, containing the substring at which to truncate the input strings


IDL> print, strtrun('test.png', '.png') test IDL> print, strtrun('test.png', 'notfound') test.png IDL> print, strtrun(['1.png','2.jpg'], '.png') 1 2.jpg

File attributes

Modifcation date: Wed Dec 1 10:43:32 2010
Lines: 40