Skip to content

Commit

Permalink
add fp example for LSC for #393
Browse files Browse the repository at this point in the history
  • Loading branch information
mebigfatguy committed Apr 19, 2020
1 parent b76d3e8 commit 71dda65
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/samples/java/ex/LSC_Sample.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package ex;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

Expand Down Expand Up @@ -170,7 +171,7 @@ public static int test14(String s2) {
return 4;

}

public String fpStringBufferForMatcher(String input) {
Pattern p = Pattern.compile("12.*myshoe");
Matcher matcher = p.matcher(input);
Expand All @@ -179,9 +180,16 @@ public String fpStringBufferForMatcher(String input) {
String prefix = matcher.group(1);
matcher.appendReplacement(stringBuffer, "shobeydobee" + prefix);
}
matcher.appendTail(stringBuffer);
matcher.appendTail(stringBuffer);

return stringBuffer.toString();
}

String loc;

public String fp393() {
String newLocale = "de_DE".equals(loc) ? "fr_FR" : "de_DE";
return newLocale;
}

}

0 comments on commit 71dda65

Please sign in to comment.