官术网_书友最值得收藏!

  • The Modern C++ Challenge
  • Marius Bancila
  • 61字
  • 2021-06-25 22:01:29

27. Splitting a string into tokens with a list of possible delimiters

Write a function that, given a string and a list of possible delimiter characters, splits the string into tokens separated by any of the delimiters and returns them in an std::vector.

Example: input: "this,is.a sample!!" with delimiters ",.! ", output: {"this", "is", "a", "sample"}.

主站蜘蛛池模板: 城口县| 峨山| 静乐县| 汾西县| 乌兰察布市| 德化县| 沁水县| 石嘴山市| 阿瓦提县| 汪清县| 固原市| 县级市| 丽江市| 昭通市| 泊头市| 会泽县| 酉阳| 增城市| 商都县| 建阳市| 镇沅| 宜昌市| 嵊泗县| 温宿县| 宁海县| 盐源县| 新河县| 滕州市| 开平市| 东兰县| 阳山县| 富平县| 石阡县| 卓尼县| 兰州市| 和田市| 建水县| 榕江县| 赤城县| 陇西县| 呈贡县|