
lt.lang.implicit.RichString Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of latte-compiler Show documentation
Show all versions of latte-compiler Show documentation
The latte-lang compiler project, which contains compiler and runtime required library.
The newest version!
package lt.lang.implicit;
import java.util.regex.Pattern;
/**
* rich String
*/
public class RichString {
private String s;
private char[] chars;
public RichString(String s) {
this.s = s;
this.chars = s.toCharArray();
}
public String add(Object o) {
return s + o;
}
public Pattern r() {
return Pattern.compile(s);
}
public Pattern r(int flags) {
return Pattern.compile(s, flags);
}
public char get(int index) {
return chars[index];
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy