Canoe
Comprehensive Atmosphere N' Ocean Engine
extract_substring.cpp
Go to the documentation of this file.
1 // C/C++
2 #include <string>
3 
4 // extract name before delimiter
5 std::string extract_first(std::string first_second, std::string delimiter) {
6  size_t delimiter_pos = first_second.find(delimiter);
7  return first_second.substr(0, delimiter_pos);
8 }
9 
10 // extract name after delimiter
11 std::string extract_second(std::string first_second, std::string delimiter) {
12  size_t delimiter_pos = first_second.find(delimiter);
13  return first_second.substr(delimiter_pos + delimiter.length());
14 }
std::string extract_first(std::string first_second, std::string delimiter)
std::string extract_second(std::string first_second, std::string delimiter)