Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define _MAXSTRING_ 50
typedef char String[_MAXSTRING_];
int Tokenise( char *buff, char *sep, char tokeniseword[][_MAXSTRING_] )
{
int i = 0, l = 0, j = 0, k = 0;
char bkp[_MAXSTRING_];
while( buff[i] != '\0' )
{
for( k = 0; sep[k] != '\0'; k++ )
{
if( buff[i] == sep[k] )
{
bkp[l] = 0;
if( strlen( bkp ) != 0)
{
strcpy( tokeniseword[j], bkp );
j++;
l = 0;
bkp[0] = 0;
}
}
else
{
bkp[l] = buff[i];
l++;
}
i++;
}
}
bkp[l] = '\0';
if(strlen( bkp ) != 0 )
{
strcpy( tokeniseword[j], bkp );
j++;
}
return j;
}
void main()
{
char *string = "username/password@dbinstance";
char *sep = "/@";
String *token;
int i;
int toknum;
token = ( String* )malloc( sizeof(String) * 3 );
toknum = Tokenise( string, sep, token );
for( i = 0; i < toknum; i++ )
{
printf("%s",token[i]);
if( i != toknum - 1 )
{
printf(",");
}
}
printf("\n");
free(token);
}