Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

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
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #string #starts
ADD COMMENT
Topic
Name
9+8 =