StringUtil.h 796 B

123456789101112131415161718192021222324252627
  1. /**
  2. * Copyright (c) 2014 ownCloud, Inc. All rights reserved.
  3. *
  4. * This library is free software; you can redistribute it and/or modify it under
  5. * the terms of the GNU Lesser General Public License as published by the Free
  6. * Software Foundation; version 2.1 of the License
  7. *
  8. * This library is distributed in the hope that it will be useful, but WITHOUT
  9. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  10. * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  11. * details.
  12. */
  13. #ifndef STRINGUTIL_H
  14. #define STRINGUTIL_H
  15. #pragma once
  16. #include <string>
  17. class __declspec(dllexport) StringUtil {
  18. public:
  19. static char* toUtf8(const wchar_t* utf16, int len = -1);
  20. static wchar_t* toUtf16(const char* utf8, int len = -1);
  21. };
  22. #endif // STRINGUTIL_H