teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

Committer:
takeru0x1103
Date:
Fri Nov 30 05:24:27 2018 +0000
Revision:
17:f9610f3cfa1b
Child:
45:3b51dd26b579
1130

Who changed what in which revision?

UserRevisionLine numberNew 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 }