summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpixel <pixel>2007-09-05 14:11:44 +0000
committerpixel <pixel>2007-09-05 14:11:44 +0000
commit81c96d4a0a44216d3b2d34517da336da5bec6c3f (patch)
treec7d868b420dc021fa864a32fbc2c21aeae866d81 /lib
parente7deb9b5b2d68756e854ea9026bbb16cadb8c0c8 (diff)
Adding upper and lower methods.
Diffstat (limited to 'lib')
-rw-r--r--lib/String.cc14
1 files changed, 13 insertions, 1 deletions
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 <stdio.h>
#include <string.h>
@@ -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;