>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  STRSUB
Libraries

STRSUB

STRSUB

Name


      STRSUB

Purpose


      Extract a substring by start and end positions.

Category


Calling Sequence


      ss = strsub(s, p1, p2)

Inputs


      s = string to extract from. in
      p1 = position of first character to extract. in
      p2 = position of last character to extract. in

Keyword Parameters


Keywords


        /LAST means positions are backwards from last char.
          Ex: strsub(s,1,0,/last) returns last 2 chars in s.

Outputs


      ss = extracted substring. out

Common Blocks


Notes


      Notes: position of first character in s is 0. If p1 and
        p2 are out of range they set to be in range.

Modification History


      Written by R. Sterner, 6 Jan, 1985.
      R. Sterner, 1996 Mar 20 --- Added /LAST.
      R. Sterner, 2010 Sep 29 --- Converted arrays from () to [].
  Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us