/*-------------------------------------------------- created by st10 at Tue Oct 25 13:32:48 PDT 2016 --------------------------------------------------*/ #include <cstdlib> #include <iostream> #include <string> #include <cmath> using namespace std; /*-------------------------------------------------- signature: is_empty : string -> bool purpose: expects a string (as a "list of char") and returns whether or not it is empty (returns true if it contains NO characters) examples: is_empty("") == true is_empty("m") == false is_empty("moo") == false --------------------------------------------------*/ bool is_empty(string a_string) { return a_string.length() == 0; }