13 #ifndef OGLPLUS_STRING_1107121519_HPP
14 #define OGLPLUS_STRING_1107121519_HPP
21 #if OGLPLUS_LAZY_STR_LIT
37 bool ValidString(
const GLchar* begin,
const GLchar* end);
43 typedef ::std::basic_string<GLchar>
String;
45 const String& EmptyString(
void)
46 OGLPLUS_NOEXCEPT(true);
53 template <
typename Left,
typename Right>
65 bool empty(
void)
const
67 return _left.empty() && _right.empty();
70 std::size_t size(
void)
const
72 return _left.size() + _right.size();
75 void append_to(
String& dest)
const
77 _left.append_to(dest);
78 _right.append_to(dest);
84 result.reserve(this->size()+1);
85 this->append_to(result);
89 #if !OGLPLUS_NO_EXPLICIT_CONVERSION_OPERATORS
90 inline explicit operator String(
void)
const
92 inline operator String(
void)
const
114 #if !OGLPLUS_LAZY_STR_LIT
118 void _check(
void)
const
131 #if OGLPLUS_DOCUMENTATION_ONLY
134 #elif !OGLPLUS_NO_NULLPTR
140 #if !OGLPLUS_LAZY_STR_LIT
145 #if OGLPLUS_DOCUMENTATION_ONLY
152 explicit StrLit(
const GLchar* literal);
153 #elif !OGLPLUS_LAZY_STR_LIT
154 template <std::
size_t N>
155 explicit StrLit(
const GLchar (&lit)[N])
160 explicit StrLit(
const GLchar* lit)
171 explicit StrLit(
const GLchar* lit, std::size_t lit_size)
177 OGLPLUS_FAKE_USE(lit_size);
184 #if !OGLPLUS_LAZY_STR_LIT
185 return String(_lit, _lit+_size);
191 void append_to(
String& dest)
const
193 #if !OGLPLUS_LAZY_STR_LIT
194 dest.append(_lit, _lit+_size);
209 #if !OGLPLUS_LAZY_STR_LIT
212 return std::strlen(_lit);
219 #if !OGLPLUS_LAZY_STR_LIT
222 return _lit[0] ==
'\0';
247 return strlit.
begin();
257 operator bool (
void)
const
268 #if OGLPLUS_DOCUMENTATION_ONLY
277 return aux::StrLitCat<StrLit, StrLit>(a, b);
280 template <
typename Left,
typename Right>
281 friend aux::StrLitCat<aux::StrLitCat<Left, Right>,
StrLit>
284 return aux::StrLitCat<aux::StrLitCat<Left, Right>,
StrLit>(a, b);
290 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
291 #include <oglplus/string.ipp>
294 #endif // include guard