#!/usr/bin/env node; /****************************************************************************** * This program illustrates some of the string functions in Utils * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ const Utils = require('./Utils'); const ltrstr = " Spaces to the left"; const rtrstr = "Spaces to the right "; const trimstr = " Spaces at each end "; const blank = " \t\n "; const lowerstr = "This String is Lowercase"; const upperstr = "This String is Uppercase"; const main = async () => { console.log("|" + Utils.ltrim(ltrstr) + "|"); console.log("|" + Utils.rtrim(rtrstr) + "|"); console.log("|" + Utils.trim(trimstr) + "|"); console.log("|" + Utils.trim(blank) + "|"); console.log("|" + lowerstr.toLowerCase() + "|"); console.log("|" + upperstr.toUpperCase() + "|"); } main().catch( e => { console.error(e) } );