#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "include/ift.h"
#include "include/substitutions.h"
Functions | |
int | iftGet (IFT *ift, char *key) |
int | iftGetNth (IFT *ift, char *key, int n) |
int | iftFindNthKey (IFT *ift, char *str, int n) |
int | iftFindNthValue (IFT *ift, char *str, int n) |
int iftFindNthKey | ( | IFT * | ift, |
char * | str, | ||
int | n | ||
) |
Find the Nth item of IFT where the specified string is found in the key. Comparison is case sensitive.
ift | Pointer to existing IFT |
str | Pointer to the case-sensitive (partial) key string |
n | Nth (1..keyNr-1) insidence of value is searched. |
References IFT_TEST, iftSetStatus(), IFT::item, IFT_KEY_AND_VALUE::key, and IFT::keyNr.
int iftFindNthValue | ( | IFT * | ift, |
char * | str, | ||
int | n | ||
) |
Find the Nth item of IFT where the specified string is found in the value. Comparison is case sensitive.
ift | Pointer to existing IFT |
str | Pointer to the case-sensitive (partial) value string |
n | Nth (1..keyNr-1) insidence of value is searched. |
References IFT_TEST, iftSetStatus(), IFT::item, IFT::keyNr, and IFT_KEY_AND_VALUE::value.
int iftGet | ( | IFT * | ift, |
char * | key | ||
) |
Find the key in the IFT and return the index [0..keyNr-1]. Key is case insensitive.
ift | Pointer to existing IFT |
key | Pointer to the key string; contents are replaced by the correct key string |
References IFT_TEST, iftSetStatus(), IFT::item, IFT_KEY_AND_VALUE::key, and IFT::keyNr.
int iftGetNth | ( | IFT * | ift, |
char * | key, | ||
int | n | ||
) |
Find the Nth key with similar name in the IFT and return the index [0..keyNr-1]. Key is case insensitive.
ift | Pointer to existing IFT |
key | Pointer to the key string; contents are replaced by the correct key string |
n | Nth (1..) insidence of key is searched. |
References IFT_TEST, iftSetStatus(), IFT::item, IFT_KEY_AND_VALUE::key, and IFT::keyNr.