SNAP Library 3.0, User Reference  2016-07-20 17:56:49
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
util.cpp File Reference

Go to the source code of this file.

Functions

int GetNthOccurence (const TChA &Url, const int &Count, const char Ch='/')
 

Function Documentation

int GetNthOccurence ( const TChA Url,
const int &  Count,
const char  Ch = '/' 
)

Definition at line 207 of file util.cpp.

207  {
208  const char *c = Url.CStr();
209  int cnt = 0;
210  while (*c && cnt != Count) {
211  if (*c == Ch) { cnt++; }
212  c++;
213  }
214  return int(c-Url.CStr()-1);
215 }
char * CStr()
Definition: dt.h:255