Chris Beaumont's IDL Library

Download source code

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

./

strtrun.pro

topstrtrun

Utilities

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.

Parameters

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

Examples

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