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
Serial/stringUtils.h@26:dc00998140af, 2015-01-16 (annotated)
- Committer:
- maximbolduc
- Date:
- Fri Jan 16 17:26:07 2015 +0000
- Revision:
- 26:dc00998140af
- Child:
- 27:9ac59b261d87
added some stuff
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
maximbolduc | 26:dc00998140af | 1 | #ifndef STRING_UTILS_H |
maximbolduc | 26:dc00998140af | 2 | #define STRING_UTILS_H |
maximbolduc | 26:dc00998140af | 3 | |
maximbolduc | 26:dc00998140af | 4 | #include <string> |
maximbolduc | 26:dc00998140af | 5 | #include <vector> |
maximbolduc | 26:dc00998140af | 6 | using namespace std; |
maximbolduc | 26:dc00998140af | 7 | |
maximbolduc | 26:dc00998140af | 8 | /** |
maximbolduc | 26:dc00998140af | 9 | * Trims whitespace characters from beginning and end of given string. |
maximbolduc | 26:dc00998140af | 10 | */ |
maximbolduc | 26:dc00998140af | 11 | string trim(const string& src, const string& c = " \r\n"); |
maximbolduc | 26:dc00998140af | 12 | |
maximbolduc | 26:dc00998140af | 13 | /** |
maximbolduc | 26:dc00998140af | 14 | * Tokenize given string delimmted by given delimter into a vector of seprate strings. |
maximbolduc | 26:dc00998140af | 15 | */ |
maximbolduc | 26:dc00998140af | 16 | vector<string> tokenize(const string& str, const string& delimiters = " "); |
maximbolduc | 26:dc00998140af | 17 | |
maximbolduc | 26:dc00998140af | 18 | #endif |
maximbolduc | 26:dc00998140af | 19 |