Horje
check if string starts with c Code Example
check if string starts with c
bool StartsWith(const char *a, const char *b)
{
   if(strncmp(a, b, strlen(b)) == 0) return 1;
   return 0;
}

...

if(StartsWith("http://stackoverflow.com", "http://")) { 
   // do something
}else {
  // do something else
}




C

Related
how to pass an array of structs as an argument in c Code Example how to pass an array of structs as an argument in c Code Example
best sites for loop practice c Code Example best sites for loop practice c Code Example
gcc undefined reference to initscr' Code Example gcc undefined reference to initscr' Code Example
error: 'endl' was not declared in this scope Code Example error: 'endl' was not declared in this scope Code Example
format in vim Code Example format in vim Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11