Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4734 in orxonox.OLD for orxonox/trunk/src/lib/util


Ignore:
Timestamp:
Jun 29, 2005, 3:05:47 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: light loadable

Location:
orxonox/trunk/src/lib/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/util/substring.cc

    r4597 r4734  
    2727#include <assert.h>
    2828
    29 SubString::SubString( const char* string)
     29SubString::SubString( const char* string, char splitter)
    3030{
    3131  n = 0;
     
    3333  assert( string != NULL);
    3434
    35   for( int i = 0; i < strlen(string); i++) if( string[i] == ',') n++;
     35  for( int i = 0; i < strlen(string); i++) if( string[i] == splitter) n++;
    3636
    3737  n += 1;
     
    4545
    4646  const char* offset = string;
    47   char* end = strchr( string, ',');
     47  char* end = strchr( string, splitter);
    4848  while( end != NULL)
    4949    {
     
    5757      end++;
    5858      offset = end;
    59       end = strchr( offset, ',');
     59      end = strchr( offset, splitter);
    6060    }
    6161
  • orxonox/trunk/src/lib/util/substring.h

    r4597 r4734  
    1111{
    1212 public:
    13   SubString(const char* string);
     13  SubString(const char* string, char splitter = ',');
    1414  ~SubString();
    1515
Note: See TracChangeset for help on using the changeset viewer.