Static Public Member Functions | List of all members
FilterStripPath Class Reference

The implementation of the "default" filter. More...

Static Public Member Functions

static TemplateVariant apply (const TemplateVariant &v, const TemplateVariant &)
 

Detailed Description

The implementation of the "default" filter.

Definition at line 1216 of file template.cpp.

Member Function Documentation

static TemplateVariant FilterStripPath::apply ( const TemplateVariant v,
const TemplateVariant  
)
inlinestatic

Definition at line 1219 of file template.cpp.

1220  {
1221  if (!v.isValid() || v.type()!=TemplateVariant::String)
1222  {
1223  return v;
1224  }
1225  QCString result = v.toString();
1226  int i=result.findRev('/');
1227  if (i!=-1)
1228  {
1229  result=result.mid(i+1);
1230  }
1231  i=result.findRev('\\');
1232  if (i!=-1)
1233  {
1234  result=result.mid(i+1);
1235  }
1236  return result;
1237  }
static QCString result
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString toString() const
Definition: template.h:232
bool isValid() const
Definition: template.h:161
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
Type type() const
Definition: template.h:142

The documentation for this class was generated from the following file: