diff --git a/src/basic/vx_log/string_array.cc b/src/basic/vx_log/string_array.cc index 60ebc4190d..fe6f42689a 100644 --- a/src/basic/vx_log/string_array.cc +++ b/src/basic/vx_log/string_array.cc @@ -560,6 +560,31 @@ bool StringArray::has(const std::string text, int & index, bool forward) const //////////////////////////////////////////////////////////////////////// +bool StringArray::all_empty() const + +{ + +bool all_empty = true; + + // + // Search for non-empty string + // + +for(auto &x : s) { + if(!x.size() == 0) { + all_empty = false; + break; + } +} + +return all_empty; + +} + + +//////////////////////////////////////////////////////////////////////// + + void StringArray::parse_wsss(const std::string text) { diff --git a/src/basic/vx_log/string_array.h b/src/basic/vx_log/string_array.h index 1061eb83e8..665828574c 100644 --- a/src/basic/vx_log/string_array.h +++ b/src/basic/vx_log/string_array.h @@ -90,6 +90,8 @@ class StringArray { bool has(const std::string, int & index, bool forward=true) const; + bool all_empty() const; + // // parse delimited strings //