Ignore:
Timestamp:
1999-06-17T11:51:53+12:00 (25 years ago)
Author:
sjboddie
Message:

added a strip_suffix function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/OIDtools.cpp

    r278 r280  
    1212/*
    1313   $Log$
     14   Revision 1.9  1999/06/16 23:51:53  sjboddie
     15   added a strip_suffix function
     16
    1417   Revision 1.8  1999/06/16 03:11:25  sjboddie
    1518   get_info() now takes a getParents argument
     
    229232}
    230233
     234// strips the ".fc", ".lc", ".pr", ".ns",
     235// or ".ps" suffix from the end of OID
     236void strip_suffix (text_t &OID) {
     237
     238  text_t tail = substr (OID.end()-3, OID.end());
     239  while (tail == ".fc" || tail == ".lc" || tail == ".pr" ||
     240     tail == ".ns" || tail == ".ps") {
     241    OID.erase (OID.end()-3, OID.end());
     242    tail = substr (OID.end()-3, OID.end());
     243  }
     244}
    231245
    232246void recurse_contents (const ResultDocInfo_t section, const bool &classify,
Note: See TracChangeset for help on using the changeset viewer.