/****************************************************************************** * This program illustrates some of the string functions in Utils * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ #include "Utils.hpp" #include #include using namespace std; static string const ltrstr = " Spaces to the left"; static string const rtrstr = "Spaces to the right "; static string const trimstr = " Spaces at each end "; static string const blank = " \t\n "; static string const lowerstr = "This String is Lowercase"; static string const upperstr = "This String is Uppercase"; int main(int argc, char **argv) { cout << '|' << Utils::ltrim(ltrstr) << '|' << endl; cout << '|' << Utils::rtrim(rtrstr) << '|' << endl; cout << '|' << Utils::trim(trimstr) << '|' << endl; cout << '|' << Utils::trim(blank) << '|' << endl; cout << '|' << Utils::tolower(lowerstr) << '|' << endl; cout << '|' << Utils::toupper(upperstr) << '|' << endl; return 0; }