summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/BString.h4
-rw-r--r--lib/String.cc14
2 files changed, 16 insertions, 2 deletions
diff --git a/include/BString.h b/include/BString.h
index 31f07d7..5db0db5 100644
--- a/include/BString.h
+++ b/include/BString.h
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: BString.h,v 1.16 2007-05-30 11:57:08 pixel Exp $ */
+/* $Id: BString.h,v 1.17 2007-09-05 14:11:44 pixel Exp $ */
#ifndef __STRING_H__
#define __STRING_H__
@@ -85,6 +85,8 @@ class String : public Base {
operator ugly_string() const;
String & toupper();
String & tolower();
+ String upper() const;
+ String lower() const;
String & iconv(const String & from, const String & to);
private:
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;