String/ForceMatch.c
void forceMatch(String* master, String* sub) {
    int i = 0;
    int j = 0;
    while (i < master->len && j < sub->len) {
        if (master->data[i] == sub->data[j]) {
            i++;
            j++;
        } else {
            i = i - j + 1;
            j = 0;
        }
    }
    if (j == sub->len) {
        printf("force match success.\n");
    } else {
        printf("force match fail.\n");
    }
}
/**
 * force match
 * @param master the pointer of master string
 * @param sub the pointer of sub string
 */
force match
@param master the pointer of master string
@param sub the pointer of sub string
force match @param master the pointer of master string @param sub the pointer of sub string
void forceMatch(String* master, String* sub) {
    int i = 0;
    int j = 0;
    while (i < master->len && j < sub->len) {
        if (master->data[i] == sub->data[j]) {
            i++;
            j++;
        } else {
            i = i - j + 1;
            j = 0;
        }
    }
    if (j == sub->len) {
        printf("force match success.\n");
    } else {
        printf("force match fail.\n");
    }
}
void forceMatch ( String * master , String * sub ) { int i = 0 ; int j = 0 ; while ( i < master -> len && j < sub -> len ) { if ( master -> data [ i ] == sub -> data [ j ] ) { i ++ ; j ++ ; } else { i = i - j + 1 ; j = 0 ; } } if ( j == sub -> len ) { printf ( " \n " ) ; } else { printf ( " \n " ) ; } }
force match
 @param master the pointer of master string
 @param sub the pointer of sub string
force match @param master the pointer of master string @param sub the pointer of sub string