Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
comFunction.cpp@17:f9610f3cfa1b, 2018-11-30 (annotated)
- Committer:
- takeru0x1103
- Date:
- Fri Nov 30 05:24:27 2018 +0000
- Revision:
- 17:f9610f3cfa1b
- Child:
- 45:3b51dd26b579
1130
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| takeru0x1103 | 17:f9610f3cfa1b | 1 | #include "comFunction.h" |
| takeru0x1103 | 17:f9610f3cfa1b | 2 | //---------------------------------------- |
| takeru0x1103 | 17:f9610f3cfa1b | 3 | //文字列スプリット |
| takeru0x1103 | 17:f9610f3cfa1b | 4 | //---------------------------------------- |
| takeru0x1103 | 17:f9610f3cfa1b | 5 | std::vector<std::string> f_Split(const std::string &str, char sep) |
| takeru0x1103 | 17:f9610f3cfa1b | 6 | { |
| takeru0x1103 | 17:f9610f3cfa1b | 7 | std::vector<std::string> v; |
| takeru0x1103 | 17:f9610f3cfa1b | 8 | std::stringstream ss(str); |
| takeru0x1103 | 17:f9610f3cfa1b | 9 | std::string buffer; |
| takeru0x1103 | 17:f9610f3cfa1b | 10 | |
| takeru0x1103 | 17:f9610f3cfa1b | 11 | while( std::getline(ss, buffer, sep) ) { |
| takeru0x1103 | 17:f9610f3cfa1b | 12 | v.push_back(buffer); |
| takeru0x1103 | 17:f9610f3cfa1b | 13 | } |
| takeru0x1103 | 17:f9610f3cfa1b | 14 | return v; |
| takeru0x1103 | 17:f9610f3cfa1b | 15 | } |