OGLplus  (0.59.0) a C++ wrapper for rendering APIs

string_span.hpp File Reference
#include "span.hpp"
#include "types.hpp"
#include <cstring>
#include <string>
#include <string_view>

Go to the source code of this file.

Classes

class  eagine::basic_string_span< C, P, S >
 Specialization of memory::basic_span for character string containers. More...
 
struct  eagine::basic_str_view_less< Str, Spn >
 Comparator template for standard string - string span comparisons. More...
 
class  eagine::basic_c_str< C, P, S >
 Helper template for getting zero-terminated strings from string spans. More...
 

Namespaces

 eagine
 Common code is placed in this namespace.
 

Typedefs

using eagine::string_span = basic_string_span< char >
 Alias for mutable string spans.
 
using eagine::string_view = basic_string_span< const char >
 Alias for const string views.
 
using eagine::str_view_less = basic_str_view_less< std::string, string_view >
 Comparator template for standard string - string_view comparisons.
 

Functions

template<typename C , typename P , typename S >
static constexpr auto eagine::std_view (memory::basic_span< C, P, S > spn) noexcept -> std::basic_string_view< std::remove_const_t< C >>
 Converts a basic_span of characters to string_span.
 
template<typename C , typename P , typename S >
static constexpr auto eagine::to_string (memory::basic_span< C, P, S > spn) -> std::basic_string< std::remove_const_t< C >>
 Converts a basic_span of characters to standard string.
 
template<typename C , typename T , typename A , typename P , typename S >
static constexpr auto eagine::assign_to (std::basic_string< C, T, A > &str, memory::basic_span< const C, P, S > spn) -> auto &
 Assigns the contents of a span of characters to a standard string.
 
template<typename C , typename T , typename A , typename P , typename S >
static constexpr auto eagine::append_to (std::basic_string< C, T, A > &str, memory::basic_span< const C, P, S > spn) -> auto &
 Appends the contents of a span of characters to a standard string.
 
template<typename C , typename P , typename S >
static constexpr auto eagine::c_str (memory::basic_span< C, P, S > s) -> std::enable_if_t< std::is_convertible_v< memory::basic_span< C, P, S >, basic_string_span< C, P, S >>, basic_c_str< C, P, S >>
 Functions that construct a basic_c_str from a basic_string_span.
 

Detailed Description

Copyright Matus Chochlik. Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt


Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).