Skip to content

Commit

Permalink
Per issue #1950, working in has() function, checking for Sort and put…
Browse files Browse the repository at this point in the history
… in initial cout's for testing. SL
  • Loading branch information
Seth Linden committed Mar 16, 2022
1 parent 328cba5 commit f74897a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions met/src/basic/vx_log/string_array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ bool StringArray::has(const std::string text, bool forward) const

int index;

cout << " From StringArray::has(), text = " << text << " forward = " << forward << endl;

return ( has(text, index, forward) );

}
Expand All @@ -404,9 +406,14 @@ bool StringArray::has(const std::string text, int & index, bool forward) const
bool found = false;
index = -1;

if(Sorted) {
cout << "From StringArray::has(), the vector of strings is Sorted (true)" << endl;
}

if (!s.empty()) {
int count;
std::string lower_text = text;
cout << " lower_text = " << lower_text << endl;
std::vector<std::string>::const_iterator it;
if ( IgnoreCase ) transform(lower_text.begin(), lower_text.end(), lower_text.begin(), ::tolower);

Expand All @@ -423,6 +430,7 @@ bool StringArray::has(const std::string text, int & index, bool forward) const
}
}
else {
cout << "(*it).c_str() = " << (*it).c_str() << endl;
if ( *it == text ) {
found = true;
break;
Expand Down

0 comments on commit f74897a

Please sign in to comment.