/****************************************************************************** * This program illustrates some of the string functions in Utils * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ import org.pureprogrammer.Utils; public class Strings4 { static final String ltrstr = " Spaces to the left"; static final String rtrstr = "Spaces to the right "; static final String trimstr = " Spaces at each end "; static final String blank = " \t\n "; static final String lowerstr = "This String is Lowercase"; static final String upperstr = "This String is Uppercase"; public static void main(String[] args) { System.out.println("|" + Utils.ltrim(ltrstr) + "|"); System.out.println("|" + Utils.rtrim(rtrstr) + "|"); System.out.println("|" + Utils.trim(trimstr) + "|"); System.out.println("|" + Utils.trim(blank) + "|"); System.out.println("|" + lowerstr.toLowerCase() + "|"); System.out.println("|" + upperstr.toUpperCase() + "|"); } }