ascii_toupper_string.cpp 500 B

1234567891011121314151617181920212223
  1. //
  2. // $Id$
  3. //
  4. #include<__vic/ascii_string.h>
  5. #include<__vic/ascii.h>
  6. namespace __vic { namespace ascii {
  7. //----------------------------------------------------------------------------
  8. std::string &toupper(std::string &st)
  9. {
  10. for(std::string::iterator it = st.begin(); it != st.end(); ++it)
  11. {
  12. const char ch = *it;
  13. if(islower(ch)) *it = lower_to_upper(ch);
  14. }
  15. return st;
  16. }
  17. //----------------------------------------------------------------------------
  18. }} // namespace