SNAP Library 6.0, User Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
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