StringHelpers.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #ifndef CRYINCLUDE_CRYCOMMONTOOLS_STRINGHELPERS_H
  9. #define CRYINCLUDE_CRYCOMMONTOOLS_STRINGHELPERS_H
  10. #pragma once
  11. #include <AzCore/std/string/string.h>
  12. #include <vector>
  13. namespace StringHelpers
  14. {
  15. // compares two strings to see if they are the same or different, case is ignored
  16. // returns 0 if the strings are the same, a -1 if the first string is bigger, or a 1 if the second string is bigger
  17. int CompareIgnoreCase(const AZStd::string& str0, const AZStd::string& str1);
  18. int CompareIgnoreCase(const AZStd::wstring& str0, const AZStd::wstring& str1);
  19. void Split(const AZStd::string& str, const AZStd::string& separator, bool bReturnEmptyPartsToo, std::vector<AZStd::string>& outParts);
  20. void Split(const AZStd::wstring& str, const AZStd::wstring& separator, bool bReturnEmptyPartsToo, std::vector<AZStd::wstring>& outParts);
  21. }
  22. #endif // CRYINCLUDE_CRYCOMMONTOOLS_STRINGHELPERS_H