summaryrefslogtreecommitdiff
path: root/src/mbgl/util/i18n.hpp
blob: c07dc91ed6555565ccb28956f55a090170f40614 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

#include <string>

namespace mbgl {
namespace util {
namespace i18n {

/** Returns whether a character is a visible character. */
bool isVisible(uint16_t chr);

/** 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