Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 31, 2010, 3:37:40 AM (14 years ago)
Author:
landauf
Message:

merged consolecommands3 branch back to trunk.

note: the console command interface has changed completely, but the documentation is not yet up to date. just copy an existing command and change it to your needs, it's pretty self-explanatory. also the include files related to console commands are now located in core/command/. in the game it should work exactly like before, except for some changes in the auto-completion.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/util/StringUtils.h

    r5738 r7284  
    4343    _UtilExport std::string getUniqueNumberString();
    4444
    45     _UtilExport void        strip(std::string* str);
    46     _UtilExport std::string getStripped(const std::string& str);
     45    _UtilExport void         strip(std::string* str);
     46    _UtilExport std::string  getStripped(const std::string& str);
    4747
    48     _UtilExport std::string removeTrailingWhitespaces(const std::string& str);
     48    _UtilExport std::string  removeTrailingWhitespaces(const std::string& str);
    4949
    50     _UtilExport size_t      getNextQuote(const std::string& str, size_t start);
    51     _UtilExport bool        isBetweenQuotes(const std::string& str, size_t pos);
     50    _UtilExport size_t       getNextQuote(const std::string& str, size_t start);
     51    _UtilExport bool         isBetweenQuotes(const std::string& str, size_t pos);
    5252
    53     _UtilExport bool        hasStringBetweenQuotes(const std::string& str);
    54     _UtilExport std::string getStringBetweenQuotes(const std::string& str);
     53    _UtilExport bool         hasStringBetweenQuotes(const std::string& str);
     54    _UtilExport std::string  getStringBetweenQuotes(const std::string& str);
    5555
    56     _UtilExport std::string stripEnclosingQuotes(const std::string& str);
    57     _UtilExport std::string stripEnclosingBraces(const std::string& str);
     56    _UtilExport std::string  stripEnclosingQuotes(const std::string& str);
     57    _UtilExport std::string  stripEnclosingBraces(const std::string& str);
    5858
    59     _UtilExport bool        isEmpty(const std::string& str);
    60     _UtilExport bool        isComment(const std::string& str);
    61     _UtilExport bool        isNumeric(const std::string& str);
     59    _UtilExport bool         isEmpty(const std::string& str);
     60    _UtilExport bool         isComment(const std::string& str);
     61    _UtilExport bool         isNumeric(const std::string& str);
    6262
    63     _UtilExport std::string addSlashes(const std::string& str);
    64     _UtilExport std::string removeSlashes(const std::string& str);
     63    _UtilExport std::string  addSlashes(const std::string& str);
     64    _UtilExport std::string  removeSlashes(const std::string& str);
    6565
    66     _UtilExport void        lowercase(std::string* str);
    67     _UtilExport std::string getLowercase(const std::string& str);
     66    _UtilExport void         lowercase(std::string* str);
     67    _UtilExport std::string  getLowercase(const std::string& str);
    6868
    69     _UtilExport void        uppercase(std::string* str);
    70     _UtilExport std::string getUppercase(const std::string& str);
     69    _UtilExport void         uppercase(std::string* str);
     70    _UtilExport std::string  getUppercase(const std::string& str);
    7171
    72     _UtilExport int         nocaseCmp(const std::string& s1, const std::string& s2);
    73     _UtilExport int         nocaseCmp(const std::string& s1, const std::string& s2, size_t len);
     72    _UtilExport int          nocaseCmp(const std::string& s1, const std::string& s2);
     73    _UtilExport int          nocaseCmp(const std::string& s1, const std::string& s2, size_t len);
    7474
    75     _UtilExport bool        hasComment(const std::string& str);
    76     _UtilExport std::string getComment(const std::string& str);
    77     _UtilExport size_t      getCommentPosition(const std::string& str);
    78     _UtilExport size_t      getNextCommentPosition(const std::string& str, size_t start = 0);
     75    _UtilExport bool         hasComment(const std::string& str);
     76    _UtilExport std::string  getComment(const std::string& str);
     77    _UtilExport size_t       getCommentPosition(const std::string& str);
     78    _UtilExport size_t       getNextCommentPosition(const std::string& str, size_t start = 0);
    7979
    80     _UtilExport size_t      replaceCharacters(std::string& str, char target, char replacement);
     80    _UtilExport size_t       replaceCharacters(std::string& str, char target, char replacement);
     81
     82    _UtilExport unsigned int getLevenshteinDistance(const std::string& str1, const std::string& str2);
    8183}
    8284
Note: See TracChangeset for help on using the changeset viewer.