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@59:3e5e5b97ca75, 2015-04-04 (annotated)
- Committer:
- maximbolduc
- Date:
- Sat Apr 04 01:22:04 2015 +0000
- Revision:
- 59:3e5e5b97ca75
- Parent:
- 27:9ac59b261d87
Current code
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 | |
jhedmonton | 27:9ac59b261d87 | 18 | |
jhedmonton | 27:9ac59b261d87 | 19 | |
jhedmonton | 27:9ac59b261d87 | 20 | void substring(char *s,char *d,int pos,int len) ; |
jhedmonton | 27:9ac59b261d87 | 21 | |
maximbolduc | 26:dc00998140af | 22 | #endif |
maximbolduc | 26:dc00998140af | 23 |