ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/utils/StringUtils.cpp
Revision: 1492
Committed: Fri Sep 24 16:27:58 2004 UTC (19 years, 9 months ago) by tim
File size: 498 byte(s)
Log Message:
change the #include in source files

File Contents

# User Rev Content
1 tim 1492 #include "utils/StringUtils.hpp"
2 gezelter 1490
3     string UpperCase(const string& S) {
4     string uc = S;
5     unsigned int n = uc.size();
6     for (unsigned int j = 0; j < n; j++) {
7     char sj = uc[j];
8     if (sj >= 'a' && sj <= 'z') uc[j] = (char)(sj - ('a' - 'A'));
9     }
10     return uc;
11     }
12    
13     string LowerCase(const string& S) {
14     string lc = S;
15     unsigned int n = lc.size();
16     for (unsigned int j = 0; j < n; j++) {
17     char sj = lc[j];
18     if (sj >= 'A' && sj <= 'Z') lc[j] = (char)(sj + ('a' - 'A'));
19     }
20     return lc;
21     }