Function array_to_string¶
function array_to_string(const std::array<size_t, Dims> &, Getter &&, int, int, std::string_view, std::string_view, std::string_view) meta¶
template <typename Fmt = void, size_t Dims, typename Getter>
std::string array_to_string(const std::array<size_t, Dims>& shape, Getter&& getter, int max_columns = 16,
int max_dimensions = INT_MAX, std::string_view separator = ", ",
std::string_view open = "{", std::string_view close = "}") Render a multi-dimensional array as a nested, brace-delimited string.
| Fmt | Optional fmt_t type used to format each element ( void = default). |
| Dims | Number of dimensions. |
| Getter | Callable returning the element at a given index. |
| shape | Extent of each dimension. |
| getter | Function returning the element for a multi-index. |
| max_columns | Maximum number of values printed per line (0 = unlimited). |
| max_dimensions | Controls line breaks between inner dimensions. |
| separator | Separator between adjacent values. |
| open | String used to open a dimension. |
| close | String used to close a dimension. |
| Formatted string. |
Fully qualified name: kfr::array_to_string(const std::array<size_t, Dims> &, Getter &&, int, int, std::string_view, std::string_view, std::string_view)
Declared at meta/string.hpp:854
Function array_to_string¶
function array_to_string(size_t, Getter &&, int, int, std::string_view, std::string_view, std::string_view) meta¶
template <typename Fmt = void, typename Getter>
std::string array_to_string(size_t size, Getter&& getter, int max_columns = 16, int max_dimensions = INT_MAX,
std::string_view separator = ", ", std::string_view open = "{",
std::string_view close = "}") Convenience overload of array_to_string for a one-dimensional array accessed through a getter callable.
| Fmt | Optional fmt_t type used to format each element ( void = default). |
| Getter | Callable returning the element at a given linear index. |
| size | Number of elements. |
| getter | Function returning the element for an index. |
| max_columns | Maximum number of values printed per line (0 = unlimited). |
| max_dimensions | Controls line breaks. |
| separator | Separator between adjacent values. |
| open | String used to open the array. |
| close | String used to close the array. |
| Formatted string. |
Fully qualified name: kfr::array_to_string(size_t, Getter &&, int, int, std::string_view, std::string_view, std::string_view)
Declared at meta/string.hpp:931
Function array_to_string¶
function array_to_string(size_t, T *, int, int, std::string_view, std::string_view, std::string_view) meta¶
template <typename Fmt = void, typename T>
std::string array_to_string(size_t size, T* data, int max_columns = 16, int max_dimensions = INT_MAX,
std::string_view separator = ", ", std::string_view open = "{",
std::string_view close = "}") Convenience overload of array_to_string for a raw pointer buffer.
| Fmt | Optional fmt_t type used to format each element ( void = default). |
| T | Element type. |
| size | Number of elements. |
| data | Pointer to the first element. |
| max_columns | Maximum number of values printed per line (0 = unlimited). |
| max_dimensions | Controls line breaks. |
| separator | Separator between adjacent values. |
| open | String used to open the array. |
| close | String used to close the array. |
| Formatted string. |
Fully qualified name: kfr::array_to_string(size_t, T *, int, int, std::string_view, std::string_view, std::string_view)
Declared at meta/string.hpp:953
This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.