Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 5, 2008, 5:54:24 PM (16 years ago)
Author:
landauf
Message:
  • added some symbols to the CommandExecutor: a) expression | expression: the pipe leads the output from the right expression into the left one b) expression > file: writes the output of the expression into a file c) expression < file: reads a file and uses it's content as input for the expression
  • added new console commands: a) echo text: returns the input b) read file: reads a file and returns the content c) write file text: writes text into a file d) append file text: appends text to a file
  • added stripEnclosingQuotes function to String.h, that removes enclosing quotes (if there are some). whitespaces outside the quotes are stripped, whitespaces inside the quotes stay. removes the quotes only if there is nothing else than whitespaces outside of them. what it changes: "expression" → expression what it let unchanged:
    • ex"press"ion
    • a"expression"b
    • a"expression"
    • "expression"b
    • express"ion
  • extended SubString: added some bools to determine the behaviour when dividing a string like the following up into pieces: mytext "this is a quoted area" blub (0, 1, 2)

this usually results in:
mytext / this is a quoted area / blub / 0, 1, 2

but now you can change it to:
mytext / "this is a quoted area" / blub / (0, 1, 2)

this is important if the string wents through several substring splitups and the quotes and brackets should stay.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core2/src/util/String.h

    r933 r994  
    3636_UtilExport void        strip(std::string* str);
    3737_UtilExport std::string getStripped(const std::string& str);
     38
     39_UtilExport void        stripEnclosingQuotes(std::string* str);
     40_UtilExport std::string getStrippedEnclosingQuotes(const std::string& str);
    3841
    3942_UtilExport bool        isEmpty(const std::string& str);
Note: See TracChangeset for help on using the changeset viewer.