alstring.h 696 B

1234567891011121314151617181920212223242526272829
  1. #ifndef AL_STRING_H
  2. #define AL_STRING_H
  3. #include <cstddef>
  4. #include <string>
  5. #include "almalloc.h"
  6. namespace al {
  7. template<typename T, typename Tr=std::char_traits<T>>
  8. using basic_string = std::basic_string<T, Tr, al::allocator<T>>;
  9. using string = basic_string<char>;
  10. using wstring = basic_string<wchar_t>;
  11. using u16string = basic_string<char16_t>;
  12. using u32string = basic_string<char32_t>;
  13. /* These would be better served by using a string_view-like span/view with
  14. * case-insensitive char traits.
  15. */
  16. int strcasecmp(const char *str0, const char *str1) noexcept;
  17. int strncasecmp(const char *str0, const char *str1, std::size_t len) noexcept;
  18. } // namespace al
  19. #endif /* AL_STRING_H */