ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
strcase.cpp
Go to the documentation of this file.
1 
9 #include "adstring.hpp"
10 
12 {
13  for (unsigned int i=1; i <= size(); i++)
14 #ifdef _MSC_VER
15  s[i] = (unsigned char)tolower(s[i]);
16 #else
17  s[i] = (unsigned char)std::tolower(s[i]);
18 #endif
19 }
20 
22 {
23  for (unsigned int i=1; i <= size(); i++)
24 #ifdef _MSC_VER
25  s[i] = (unsigned char)toupper(s[i]);
26 #else
27  s[i] = (unsigned char)std::toupper(s[i]);
28 #endif
29 }
30 
32 {
33  adstring t = s;
34  t.to_lower();
35  return(t);
36 }
37 
39 {
40  adstring t = s;
41  t.to_upper();
42  return(t);
43 }
size_t size() const
Definition: string.cpp:58
void to_upper(void)
Definition: strcase.cpp:21
void to_lower(void)
Definition: strcase.cpp:11
adstring to_upper(adstring &s)
Definition: strcase.cpp:38
adstring to_lower(adstring &s)
Definition: strcase.cpp:31
unsigned char * s
Definition: adstring.hpp:76