SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
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
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: