DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
concepts_string.h
1 /*********************************************************************************************************************************************/
2 /* DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. */
3 /* Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, */
4 /* document analysis. Offline processing possible for security and confidentiality */
5 /* */
6 /* Copyright (c) SILVERCODERS Ltd, http://silvercoders.com */
7 /* Project homepage: https://github.com/docwire/docwire */
8 /* */
9 /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-DocWire-Commercial */
10 /*********************************************************************************************************************************************/
11 
12 #ifndef DOCWIRE_CONCEPTS_STRING_H
13 #define DOCWIRE_CONCEPTS_STRING_H
14 
15 #include <concepts>
16 #include <string_view>
17 #include <type_traits>
18 
19 namespace docwire
20 {
21 
25 template <typename T>
26 concept string_method_equipped = requires(const T& t) { { t.string() } -> std::convertible_to<std::string_view>; };
27 
31 template<typename T>
32 concept string_like = std::is_convertible_v<T, std::string_view>;
33 
34 } // namespace docwire
35 
36 #endif // DOCWIRE_CONCEPTS_STRING_H
The main namespace for the DocWire SDK.
Definition: ai_elements.h:19
concept string_like
Concept for string-like types that can be converted to a string view.
requires(!string_method_equipped< T >) struct stringifier< T >
Specialization for types that are streamable to std::ostream.
concept string_method_equipped
Concept for types that have a string() member method.