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
}
Code Example |
---|
C :: get window width height glfw |
C :: printf with bool |
C :: express.static public |
C :: roshan kumar |
C :: how to auto run something on cmd |
C :: send http request in C |
C :: c loop through binary search tree |
C :: remove from string c |
C :: C program to display fibonacci serice |
C :: npm fix old lockfile |
C :: how to read space separated words in c |
C :: how to mutex lock in c |
C :: c programming itoa() example |
C :: how to sleep in c |
C :: random float number in C |
C :: right side of div |
C :: pthread c |
C :: c realloc |
C :: c memset |
C :: c get current month, year, day |
C :: geom boxplot remove outliers |
C :: to run Blazor project using CLI |
C :: bash get load average |
C :: pointers to a function in c |
C :: convert string to int error checking c |
C :: c print 2d array |
C :: empiler une pile on c |
C :: access 2d array with pointer c |
C :: convert video to gif with ffmpeg |
C :: find sum of all odd numbers from 1 to n using for loop |