| Constructs an object of class basic_string and determines the effective length rlen of the initial string value as the smaller of n and ``str.size() - pos``.
Throws
========================================
| std::out_of_range if ``pos > str.size()``.
Examples
========================================
..sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto x = string<8>("homuhomu");
SPROUT_STATIC_CONSTEXPR auto y = string<8>(x, 4, 4);
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
| s points to an array of at least ``traits_type::length(s) + 1`` elements of value_type.
|``traits_type::length(s) <= N``.
Effects
========================================
| Constructs an object of class basic_string and determines its initial string value from the array of value_type of length ``traits_type::length(s)`` whose first element is designated by s.
Throws
========================================
| std::out_of_range if ``traits_type::length(s) > N``.
| s points to an array of at least n elements of value_type.
|``min(n, traits_type::length(s)) <= N``.
Effects
========================================
| Constructs an object of class basic_string and determines its initial string value from the array of value_type of length n whose first element is designated by s.
Throws
========================================
| std::out_of_range if ``min(n, traits_type::length(s)) > N``.
| If InputIterator is an integral type, equivalent to ``basic_string(static_cast<size_type>(first), static_cast<value_type>(last))``.
| Otherwise constructs a string from the values in the range [begin,end).
Throws
========================================
| std::out_of_range if ``distance(first, last) > N``.
Examples
========================================
..sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto x = string<8>("homuhomu");
SPROUT_STATIC_CONSTEXPR auto y = string<8>(x.begin(), x.end());
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth if InputIterator meets ConstexprRandomAccessIterator requirements or an integral type, and *O(logN)* (logarithmic) depth otherwise.