Utilities
Utilities header only library
ExtCEGUI.h
1 /*
2  Copyright (C) Skeletex Research, s.r.o. - All Rights Reserved
3  Unauthorized copying of this file, via any medium is strictly prohibited
4  Proprietary and confidential
5 */
6 #ifndef UTILS_EXT_CEGUI_H
7 #define UTILS_EXT_CEGUI_H
8 #include <CEGUI/CEGUI.h>
9 #include <Utils/ExtSTD.h>
10 
12 namespace cegui_ext
13 {
15  inline bool IsASCII(const CEGUI::String &str)
16  {
17  return str.length() == str.utf8_stream_len();
18  }
19 
21  inline bool AreAllASCII(const std::vector<CEGUI::String> &strings)
22  {
23  return std_ext::AllOf(strings, [](const CEGUI::String & str) { return IsASCII(str); });
24  }
25 }
26 
27 #endif /* !UTILS_EXT_CEGUI_H */
auto AllOf(const C &container, const P &Predicate) -> bool
Simplified wrapper for std::all_of.
Definition: ExtSTD.h:841
bool AreAllASCII(const std::vector< CEGUI::String > &strings)
Check Multiple CEGUI Strings for non-ASCII characters.
Definition: ExtCEGUI.h:21
bool IsASCII(const CEGUI::String &str)
Check CEGUI String for non-ASCII characters.
Definition: ExtCEGUI.h:15
Extensions to the CEGUI library.
Definition: ExtCEGUI.h:12