Add to_string_view(int) overload.

This commit is contained in:
King_DuckZ 2018-07-28 11:42:01 +01:00
parent b935e7e72e
commit beb4d231b2

View file

@ -295,6 +295,11 @@ namespace dhandy {
std::basic_string_view<T> to_string_view (const ReversedSizedArray<T, S>& ary) { std::basic_string_view<T> to_string_view (const ReversedSizedArray<T, S>& ary) {
return std::basic_string_view<T>(ary.data(), ary.size() - 1); return std::basic_string_view<T>(ary.data(), ary.size() - 1);
} }
template <typename I, typename C=char>
std::basic_string_view<C> to_string_view (I num) {
return std::basic_string_view<C>(int_to_ary(num));
}
#endif #endif
} //namespace dhandy } //namespace dhandy