Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2008, 5:30:11 AM (17 years ago)
Author:
landauf
Message:

merged console branch into network branch

after several heavy troubles it compiles, but there is still a bug I couldn't fix: orxonox crashes as soon as one presses a key after opening the console… maybe someone else sees the problem?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/util/String.cc

    r1219 r1446  
    185185    else
    186186        return str;
     187}
     188
     189/**
     190    @brief Removes enclosing {braces}.
     191    @param str The string to strip
     192    @return The striped string
     193*/
     194std::string stripEnclosingBraces(const std::string& str)
     195{
     196    std::string output = str;
     197
     198    while (output.size() >= 2 && output[0] == '{' && output[output.size() - 1] == '}')
     199        output = output.substr(1, output.size() - 2);
     200
     201    return output;
    187202}
    188203
Note: See TracChangeset for help on using the changeset viewer.