14#ifndef OR_TOOLS_UTIL_STRING_ARRAY_H_
15#define OR_TOOLS_UTIL_STRING_ARRAY_H_
20#include "absl/strings/string_view.h"
26#define RETURN_STRINGIFIED_VECTOR(vector, separator, method) \
28 for (int i = 0; i < vector.size(); ++i) { \
29 if (i > 0) out += separator; \
30 out += vector[i] method; \
41 absl::string_view separator) {
48 absl::string_view separator) {
54std::string
JoinNamePtr(
const std::vector<T>& v, absl::string_view separator) {
61 absl::string_view separator) {
65#undef RETURN_STRINGIFIED_VECTOR
const std::string name
A name for logging purposes.
In SWIG mode, we don't want anything besides these top-level includes.
std::string JoinDebugStringPtr(const std::vector< T > &v, absl::string_view separator)
Join v[i]->DebugString().
std::string JoinNameFieldPtr(const std::vector< T > &v, absl::string_view separator)
Join v[i]->name.
std::string JoinNamePtr(const std::vector< T > &v, absl::string_view separator)
Join v[i]->name().
std::string JoinDebugString(const std::vector< T > &v, absl::string_view separator)
Join v[i].DebugString().
#define RETURN_STRINGIFIED_VECTOR(vector, separator, method)
-------— Pretty Print Helpers -------—