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.
Dependencies: FreePilot PinDetect mbed-src
Fork of FreePilot_V2-2 by
Diff: Serial/stringUtils.h
- Revision:
- 26:dc00998140af
- Child:
- 27:9ac59b261d87
diff -r ae0408ebdd68 -r dc00998140af Serial/stringUtils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Serial/stringUtils.h Fri Jan 16 17:26:07 2015 +0000 @@ -0,0 +1,19 @@ +#ifndef STRING_UTILS_H +#define STRING_UTILS_H + +#include <string> +#include <vector> +using namespace std; + +/** + * Trims whitespace characters from beginning and end of given string. + */ +string trim(const string& src, const string& c = " \r\n"); + +/** + * Tokenize given string delimmted by given delimter into a vector of seprate strings. + */ +vector<string> tokenize(const string& str, const string& delimiters = " "); + +#endif + \ No newline at end of file