RGETLINE. END sets the right margin to be scanned for OLD in TARGETLINE.</p>
<h2><a class="anchor" id="autotoc_md4"></a>
EXAMPLES</h2>
<pre class="fragment">Sample Program:

 program demo_substitute
 use M_time, only : substitute
 implicit none
 ! must be long enough to hold changed line
 character(len=80) :: targetline

 targetline='this is the input string'
 write(*,*)'ORIGINAL    : '//trim(targetline)

 ! changes the input to 'THis is THe input string'
 call substitute(targetline,'th','TH')
 write(*,*)'t