source: release-kits/lirk3/ant-scripts/tasks/antelope/src/ise/antelope/tasks/typedefs/string/Replace.java@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 647 bytes
Line 
1package ise.antelope.tasks.typedefs.string;
2
3/**
4 * Copyright 2003
5 *
6 * @version $Revision: 1.1 $
7 */
8public class Replace implements StringOp {
9
10
11 private String regex = "";
12 private String replacement = "";
13
14 public void setRegex(String regex) {
15 this.regex = regex;
16 }
17
18 public void setReplacement(String replacement) {
19 this.replacement = replacement;
20 }
21
22 /**
23 * Description of the Method
24 *
25 * @param s
26 * @return Description of the Returned Value
27 */
28 public String execute(String s) {
29 return s.replaceAll(regex, replacement);
30
31 }
32}
33
34
Note: See TracBrowser for help on using the repository browser.