All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lt.lang.implicit.RichString Maven / Gradle / Ivy

Go to download

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