summaryrefslogtreecommitdiff
path: root/src/mbgl/util/i18n.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/util/i18n.hpp')
-rw-r--r--src/mbgl/util/i18n.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mbgl/util/i18n.hpp b/src/mbgl/util/i18n.hpp
new file mode 100644
index 0000000000..f1d3f53f72
--- /dev/null
+++ b/src/mbgl/util/i18n.hpp
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <string>
+
+namespace mbgl {
+namespace util {
+namespace i18n {
+
+/** Returns whether a line break can be inserted after the character indicated
+ by the given Unicode codepoint due to word breaking. */
+bool allowsWordBreaking(uint16_t chr);
+
+/** Returns whether a line break can be inserted after any character in the
+ given string. If false, line breaking should occur on word boundaries
+ instead. */
+bool allowsIdeographicBreaking(const std::u16string& string);
+
+/** Returns whether a line break can be inserted after the character indicated
+ by the given Unicode codepoint due to ideographic breaking. */
+bool allowsIdeographicBreaking(uint16_t chr);
+
+} // namespace i18n
+} // namespace util
+} // namespace mbgl