Properties SourceCde
txt
1
*&---------------------------------------------------------------------*
2
*&  Include           ZUTIL_CMD_REPLACE                                *
3
*&                                                                     *
4
*&---------------------------------------------------------------------*
5
*&                                                                     *
6
*& This file is part of ZUTIL.                                         *
7
*&                                                                     *
8
*& ZUTIL is free software: you can redistribute it and/or modify       *
9
*& it under the terms of the GNU General Public License as published   *
10
*& by the Free Software Foundation, either version 3 of the License,   *
11
*& or any later version.                                               *
12
*&                                                                     *
13
*& ZUTIL is distributed in the hope that it will be useful,            *
14
*& but WITHOUT ANY WARRANTY; without even the implied warranty of      *
15
*& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       *
16
*& GNU General Public License for more details.                        *
17
*&                                                                     *
18
*& You should have received a copy of the GNU General Public License   *
19
*& along with ZUTIL. If not, see <http://www.gnu.org/licenses/>.       *
20
*&                                                                     *
21
*&---------------------------------------------------------------------*
22
*&                                                                     *
23
*&  Author:     Ruediger von Creytz     ruediger.creytz@globalbit.net  *
24
*&  Copyright:  globalBIT, LLC          http://www.globalbit.net       *
25
*&                                                                     *
26
*&---------------------------------------------------------------------*
27
 
28
 
29
*-----------------------------------------------------------------------
30
* replace_all
31
*-----------------------------------------------------------------------
32
FORM replace_all
33
  USING
34
    value(i_old)
35
    value(i_new)
36
  CHANGING
37
    c_str TYPE any.
38
 
39
  REPLACE ALL OCCURRENCES OF i_old IN c_str WITH i_new.
40
 
41
ENDFORM.                    "replace_all
42
 
43
 
44
*-----------------------------------------------------------------------
45
* replace_single
46
*-----------------------------------------------------------------------
47
FORM replace_single
48
  USING
49
    value(i_old)
50
    value(i_new)
51
  CHANGING
52
    c_str TYPE any.
53
 
54
  REPLACE i_old IN c_str WITH i_new.
55
 
56
ENDFORM.                    "replace_single