teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

comFunction.cpp

Committer:
MasashiNomura
Date:
2019-02-13
Revision:
45:3b51dd26b579
Parent:
17:f9610f3cfa1b

File content as of revision 45:3b51dd26b579:

/**
* @file comFunction.cpp
* @brief STDLIBを使用した文字列を扱う関数定義
* @author Nomura
* @date 2018/10/01 ?
*/

#include "comFunction.h"
//----------------------------------------
//文字列スプリット
//----------------------------------------
std::vector<std::string> f_Split(const std::string &str, char sep)
{
    std::vector<std::string> v;
    std::stringstream ss(str);
    std::string buffer;
    
    while( std::getline(ss, buffer, sep) ) {
        v.push_back(buffer);
    }
    return v;
}