home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / clipper / nettos11.zip / MISC / SSFP.PRG < prev    next >
Text File  |  1993-03-30  |  2KB  |  65 lines

  1. /*
  2.  *   File......: SSFP.Prg
  3.  *   Author....: Sheldon Easterbrook
  4.  *   CIS ID....: 71421,254
  5.  *   Date......: $Date$
  6.  *   Revision..: $Revision$
  7.  *   Log File..: $LogFile$
  8.  *
  9.  *   This is an original work by Sheldon Easterbrook and is placed in the
  10.  *   Public Domain
  11.  *
  12.  *   Modification History:
  13.  *   ---------------------
  14.  *
  15.  *   $Log$
  16.  *
  17.  */
  18.  
  19. /*  $DOC$
  20.  *  $FUNCNAME$
  21.  *     Fn_SSFromP()
  22.  *  $CATEGORY$
  23.  *     Miscellaneous
  24.  *  $ONELINER$
  25.  *      Remove the file server name from a path string
  26.  *  $SYNTAX$
  27.  *
  28.  *      Fn_SSFromP( <cFullPath>,<@cServerName> ) -> cStrippedPath
  29.  *
  30.  *  $ARGUMENTS$
  31.  *
  32.  *      <cFullPath>   - The path from which the server name is to be
  33.  *                      stripped.
  34.  *
  35.  *      <cServerName> - The stripped file server name (MUST BE PASSED BY
  36.  *                      REFERENCE!)
  37.  *
  38.  *  $RETURNS$
  39.  *
  40.  *     <cStrippedPath> - <cFullPath> less <cServerName>.
  41.  *
  42.  *  $DESCRIPTION$
  43.  *
  44.  *      This function strips the server name from the specified path.
  45.  *      If the path does not include a file server specification, then
  46.  *      the function returns the original path.
  47.  *
  48.  *  $EXAMPLES$
  49.  *
  50.  *      cStripped := Fn_SSFromP( "FS1/SYS:\PUBLIC",@cServer )
  51.  *      ? cStripped     // "SYS:\PUBLIC"
  52.  *      ? cServer       // "FS1"
  53.  *
  54.  *  $SEEALSO$
  55.  *
  56.  *  $INCLUDE$
  57.  *
  58.  *  $END$
  59.  */
  60.  
  61. function Fn_SSFromP( cPath, cServer )
  62.    cServer := SubStr( cPath,1,( At( "/",cPath )))
  63.    cPath   := SubStr( cPath,( At( "/",cPath )+1 ))
  64.    return( cPath )
  65.