OpenPFC  0.1.4
Phase Field Crystal simulation framework
Loading...
Searching...
No Matches
array_to_string.hpp File Reference

Convert std::array to string representation. More...

#include <array>
#include <cstddef>
#include <sstream>
#include <string>
Include dependency graph for array_to_string.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T , std::size_t D>
std::string pfc::utils::array_to_string (const std::array< T, D > &arr)
 

Detailed Description

Convert std::array to string representation.

This header provides the array_to_string() template function for converting std::array<T, D> to a formatted string representation.

The function produces output in the format: {value1, value2, value3} which is useful for debugging, logging, and displaying array contents.

std::array<int, 3> size = {64, 64, 64};
std::string str = pfc::utils::array_to_string(size);
// str is "{64, 64, 64}"
Convert std::array to string representation.
See also
utils/show.hpp for formatted array display
utils.hpp for other utility functions
Author
OpenPFC Development Team
Date
2025