std::vector to string with custom delimiter

前端 未结 9 1334
独厮守ぢ
独厮守ぢ 2020-12-03 16:42

I would like to copy the contents of a vector to one long string with a custom delimiter. So far, I\'ve tried:

// .h
string getLabe         


        
9条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-03 17:22

    std::string Gesture::getLabeledPointsString(const std::string delimiter) {
      return boost::join(getLabeledPoints(), delimiter);
    }
    

    I am not that convinced about introducting getLabeledPointsString at this point ;)

提交回复
热议问题