
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		String s = "Ishikaika";
		
		// searching
		System.out.println(s.contains("sh"));
		System.out.println(s.indexOf('k'));
		System.out.println(s.indexOf("ika"));
		System.out.println(s.lastIndexOf("ika"));
		System.out.println(s.startsWith("Ish"));
		System.out.println(s.endsWith("ika"));
		
		// extraction/ transformations
		System.out.println(s.substring(3)); // from given index till end of string
		System.out.println(s.substring(3, 6)); // start and end index [start, end)
		
		System.out.println(s.toUpperCase());
		System.out.println(s.toLowerCase());
		
		String s1 = "   drum sticks  ";
		System.out.println(s1.trim());
		System.out.println(s1.strip()); // unicode friendly
		
		String s2 = "helperhelps";
		System.out.println(s2.repeat(3));
		System.out.println(s2.replace('l', 'u'));
		System.out.println(s2.replace("lp", "uk"));
		System.out.println(s2.replaceAll("lp", "uk"));
		String s3 = "hello-hi-bye-world";
		String[] arr = s3.split("-");
		for(String i: arr)
			System.out.println(i);
		
		System.out.println(String.join(",", "a","b","c"));
	}
}