Ai
1 Star 0 Fork 2

FantasyVR/position-based-dynamic-GPU

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
StringTools.h 727 Bytes
Copy Edit Raw Blame History
李开诚 authored 2020-06-04 13:39 +08:00 . first commit
#ifndef __StringTools_h__
#define __StringTools_h__
#include <vector>
#include <iostream>
namespace Utilities
{
/** \brief Tools to handle std::string objects
*/
class StringTools
{
public:
static void tokenize(const std::string& str, std::vector<std::string>& tokens, const std::string& delimiters = " ")
{
std::string::size_type lastPos = str.find_first_not_of(delimiters, 0);
std::string::size_type pos = str.find_first_of(delimiters, lastPos);
while (std::string::npos != pos || std::string::npos != lastPos)
{
tokens.push_back(str.substr(lastPos, pos - lastPos));
lastPos = str.find_first_not_of(delimiters, pos);
pos = str.find_first_of(delimiters, lastPos);
}
}
};
}
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fantasyvr/position-based-dynamic-GPU.git
git@gitee.com:fantasyvr/position-based-dynamic-GPU.git
fantasyvr
position-based-dynamic-GPU
position-based-dynamic-GPU
master

Search