JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / src / com / stevesoft / pat / AmpersandRule.java
1 //
2 // This software is now distributed according to
3 // the Lesser Gnu Public License.  Please see
4 // http://www.gnu.org/copyleft/lesser.txt for
5 // the details.
6 //    -- Happy Computing!
7 //
8 package com.stevesoft.pat;
9
10 /**
11  * This implements the $& element of the second argument to Regex.
12  * 
13  * @see com.stevesoft.pat.ReplaceRule
14  */
15 public final class AmpersandRule extends ReplaceRule
16 {
17   public AmpersandRule()
18   {
19   }
20
21   public void apply(StringBufferLike sb, RegRes res)
22   {
23     sb.append(res.stringMatched());
24   }
25
26   public String toString1()
27   {
28     return "$&";
29   }
30 }