From 81c96d4a0a44216d3b2d34517da336da5bec6c3f Mon Sep 17 00:00:00 2001 From: pixel Date: Wed, 5 Sep 2007 14:11:44 +0000 Subject: Adding upper and lower methods. --- lib/String.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/String.cc b/lib/String.cc index de8fa24..948f012 100644 --- a/lib/String.cc +++ b/lib/String.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: String.cc,v 1.47 2007-05-30 11:57:10 pixel Exp $ */ +/* $Id: String.cc,v 1.48 2007-09-05 14:11:44 pixel Exp $ */ #include #include @@ -534,6 +534,18 @@ String & String::tolower() { return *this; } +String String::upper() const { + String r = *this; + r.toupper(); + return r; +} + +String String::lower() const { + String r = *this; + r.tolower(); + return r; +} + String String::ltrim() const { char * d = (char *) malloc(strlen() + 1), * p, * r; int s; -- cgit v1.2.3