856c7e0398ae87021ce9fa033b1831c8f893106a
[jalviewjs.git] / unused / com / stevesoft / pat / LeftRule.java
1 //\r
2 // This software is now distributed according to\r
3 // the Lesser Gnu Public License.  Please see\r
4 // http://www.gnu.org/copyleft/lesser.txt for\r
5 // the details.\r
6 //    -- Happy Computing!\r
7 //\r
8 package com.stevesoft.pat;\r
9 \r
10 /**\r
11  * The apply(StringBufferLike sb,RegRes res) method of this derivation of\r
12  * ReplaceRule appends the contents of res.left() to the javajs.util.SB sb.\r
13  * \r
14  * @see com.stevesoft.pat.ReplaceRule\r
15  */\r
16 public class LeftRule extends ReplaceRule\r
17 {\r
18   public LeftRule()\r
19   {\r
20   }\r
21 \r
22   public void apply(StringBufferLike sb, RegRes res)\r
23   {\r
24     sb.appendStr(res.left());\r
25   }\r
26 \r
27   public String toString1()\r
28   {\r
29     return "$`";\r
30   }\r
31 }\r