-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Unicode constants moved from external libraries to here!
- Loading branch information
Showing
3 changed files
with
200 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// ============================================================================= | ||
// | ||
// ztd.idk | ||
// Copyright © 2021 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: opensource@soasis.org | ||
// | ||
// Commercial License Usage | ||
// Licensees holding valid commercial ztd.idk licenses may use this file in | ||
// accordance with the commercial license agreement provided with the | ||
// Software or, alternatively, in accordance with the terms contained in | ||
// a written agreement between you and Shepherd's Oasis, LLC. | ||
// For licensing terms and conditions see your agreement. For | ||
// further information contact opensource@soasis.org. | ||
// | ||
// Apache License Version 2 Usage | ||
// Alternatively, this file may be used under the terms of Apache License | ||
// Version 2.0 (the "License") for non-commercial use; you may not use this | ||
// file except in compliance with the License. You may obtain a copy of the | ||
// License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// ============================================================================> | ||
|
||
#pragma once | ||
|
||
#ifndef ZTD_IDK_DETAIL_UNICODE_HPP | ||
#define ZTD_IDK_DETAIL_UNICODE_HPP | ||
|
||
#include <ztd/idk/version.hpp> | ||
|
||
#include <ztd/idk/detail/unicode.h> | ||
#include <ztd/idk/charN_t.h> | ||
|
||
#include <ztd/prologue.hpp> | ||
|
||
namespace ztd { | ||
ZTD_IDK_INLINE_ABI_NAMESPACE_OPEN_I_ | ||
namespace __idk_detail { | ||
template <bool _IsOverlong> | ||
inline constexpr int __utf8_decode_length(ztd_char32_t __value) noexcept { | ||
if constexpr (_IsOverlong) { | ||
return __ztd_idk_detail_utf8_decode_length_overlong(__value); | ||
} | ||
else { | ||
return __ztd_idk_detail_utf8_decode_length(__value); | ||
} | ||
} | ||
} // namespace __idk_detail | ||
ZTD_IDK_INLINE_ABI_NAMESPACE_CLOSE_I_ | ||
} // namespace ztd | ||
|
||
#include <ztd/epilogue.hpp> | ||
|
||
#endif // ZTD_IDK_DETAIL_UNICODE_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters