Search Site | Contact Details | FAQ

ADAS Subroutine xxrepl

      subroutine xxrepl( cstrg1 , csub1, csub2, cstrg2 , nsubs )

c-----------------------------------------------------------------------
c
c  ****************** fortran77 subroutine: xxrepl *********************
c
c  purpose: to replace all occurrences of a substring in a string with
c           an alternative substring
c
c  calling program: general use
c
c  subroutine:
c
c  input : (c*(*)) cstrg1   = input character string for conversion
c  input : (c*(*)) csub1    = character sub-string to replace
c  input : (c*(*)) csub2    = character sub-string to substitute
c
c  output: (c*(*)) cstrg2   = output string after conversion
c  output: (i*4)   nsubs    = number of substitutions made
c
c          (i*4)   i        = general use
c          (i*4)   ilen1    = length of string in bytes
c          (i*4)   ilen2    = length of string in bytes
c          (i*4)   nsubs_max= maximum number of subsitutions allowed
c
c routines:
c          routine    source    brief description
c          -------------------------------------------------------------
c          i4unit     adas      fetch unit number for output of messages
c
c note:
c
c
c author:  Hugh Summers,  University of Strathclyde
c          JA7.08
c          Tel. 0141-548-4196
c
c date  :  17/09/05
c
c version: 1.1                          date: 17/08/2005
c modified: Hugh Summers
c               - first edition.
c
c version: 1.2                          date: 03/01/2007
c modified: Hugh Summers
c               - remove redundant format statements.
c
c-----------------------------------------------------------------------
c-----------------------------------------------------------------------
c
c-----------------------------------------------------------------------
      CHARACTER*(*)       CSTRG1,      CSTRG2,      CSUB1,       CSUB2
      INTEGER             NSUBS
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk