>  Docs Center  >  Libraries  >  Beaumont  >  STRTRUN

STRTRUN

STRTRUN

Purpose


  This function removes the last section from a string

Category


  Utilities

Inputs


  string: A string scalar or array to truncate
  search: A search string, containing the substring at which
          to truncate the input strings

Outputs


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

Example


  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

Modification History


  Jan 2010: Written by Chris Beaumont



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us