src/ui/a11y/lib/screen_reader/speaker.cc
// Concatenates all utterance strings into a single string.
Concatenates all utterance strings into a single string.
Concatenates all utterance strings into a single string .
std::string ConcatenateUtterances(
    const std::vector<ScreenReaderMessageGenerator::UtteranceAndContext>& utterances) {
  std::string utterance;
  if (!utterances.empty()) {
    auto it = utterances.begin();
    utterance = it->utterance.has_message() ? it->utterance.message() : "";
    it++;
    while (it != utterances.end()) {
      if (it->utterance.has_message()) {
        utterance += " " + it->utterance.message();
      }
      it++;
    }
  }
  return utterance;
}
std :: string ConcatenateUtterances ( const std :: vector < ScreenReaderMessageGenerator :: UtteranceAndContext > & utterances ) { std :: string utterance ; if ( ! utterances . empty ( ) ) { auto it = utterances . begin ( ) ; utterance = it -> utterance . has_message ( ) ? it -> utterance . message ( ) : " " ; it ++ ; while ( it != utterances . end ( ) ) { if ( it -> utterance . has_message ( ) ) { utterance += " " + it -> utterance . message ( ) ; } it ++ ; } } return utterance ; }
Concatenates all utterance strings into a single string.
Concatenates all utterance strings into a single string .