SNAP Library 6.0, Developer 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
This graph shows which files directly or indirectly include this file:

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.

References TChA::CStr().

Referenced by TStrUtil::GetWebsiteNm().

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

Here is the call graph for this function:

Here is the caller graph for this function: