+ string::size_type idx = b.find("|++|");
+ if (idx == string::npos) {
+ cmdname = b;
+ contents = "";
+ options = "";
+ return;
+ }
+
+ cmdname = b.substr(0, idx);
+ string tmp = b.substr(idx+4);
+
+ idx = tmp.find("|++|");
+ if (idx == string::npos) {
+ contents = tmp;
+ options = "";
+ } else {
+ contents = tmp.substr(0, idx);
+ options = tmp.substr(idx+4);
+ }