SNAP Library 2.1, Developer Reference  2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
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().

                                                                          {
  const char *c = Url.CStr();
  int cnt = 0;
  while (*c && cnt != Count) {
    if (*c == Ch) { cnt++; }
    c++;
  }
  return int(c-Url.CStr()-1);
}

Here is the call graph for this function:

Here is the caller graph for this function: