|  | 
| recursive character(strlen) function | replace (string, from, to, recursive, start_pos) | 
|  | 
Definition at line 128 of file dc_string.f90.
 
◆ replace()
  
  | 
        
          | recursive character(strlen) function dc_string::replace::replace | ( | character(*), intent(in) | string, |  
          |  |  | character(*), intent(in) | from, |  
          |  |  | character(*), intent(in) | to, |  
          |  |  | logical, intent(in), optional | recursive, |  
          |  |  | integer, intent(in), optional | start_pos |  
          |  | ) |  |  |  | private | 
 
Definition at line 1264 of file dc_string.f90.
 1292     character(STRLEN):: result
  1293     character(*), 
intent(in):: 
string, from, to
  1294     logical, 
intent(in), 
optional:: recursive
  1295     integer, 
intent(in), 
optional:: start_pos
  1297     integer:: i, isa, isb, iea, ieb
  1300     if ( 
present(start_pos) ) 
then  1310     i = index(result(sp:), from)
  1315     if (len(to) < len(from)) 
then  1317       ieb = len(result) + len(to) - len(from)
  1319       iea = len(result) + len(from) - len(to)
  1322     if (len(to) /= len(from)) result(isb:ieb) = result(isa:iea)
  1323     result(i:i+len(to)-1) = to
  1328     ir = index(result(i+len(to):), from)
  1329     if ( len_trim(from) == 0 ) 
then  1330       ir = index(trim(result(i+len(to):)), from)
  1333       if ( 
present(
recursive) ) 
then  1334         if ( 
recursive ) 
then  1336             &               from = from, to = to, &
  1337             &               
recursive = 
recursive, &
  1338             &               start_pos = i+len(to) )
 
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ 
 
 
The documentation for this interface was generated from the following file: