Java tutorial
//package com.java2s; //License from project: Apache License import static java.lang.String.format; public class Main { public static String textContains(String text) { return format("contains(%s, '%s')", translateTextForPath("text()"), text.toLowerCase()); } public static String translateTextForPath(String txt) { return format("translate(%s, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')", txt); } }