Sameer Agarwal | ea11704 | 2012-08-29 18:18:48 -0700 | [diff] [blame] | 1 | // Copyright 2011 Google Inc. All Rights Reserved. |
| 2 | // Author: keir@google.com (Keir Mierle) |
| 3 | |
| 4 | #ifndef CERES_INTERNAL_SPLIT_H_ |
Petter Strandmark | eb38e74 | 2012-09-08 13:53:24 -0700 | [diff] [blame] | 5 | #define CERES_INTERNAL_SPLIT_H_ |
Sameer Agarwal | ea11704 | 2012-08-29 18:18:48 -0700 | [diff] [blame] | 6 | |
| 7 | #include <string> |
| 8 | #include <vector> |
| 9 | #include "ceres/internal/port.h" |
| 10 | |
| 11 | namespace ceres { |
| 12 | |
| 13 | // Split a string using one or more character delimiters, presented as a |
| 14 | // nul-terminated c string. Append the components to 'result'. If there are |
| 15 | // consecutive delimiters, this function skips over all of them. |
| 16 | void SplitStringUsing(const string& full, const char* delim, |
| 17 | vector<string>* res); |
| 18 | |
| 19 | } // namespace ceres |
| 20 | |
| 21 | #endif // CERES_INTERNAL_SPLIT_H_ |