char *anchorid;
void get_anchorid(char anchorname[])
{
anchorid = anchorname;
int i, j;
for (i = 0, j = 0; anchorname[i] != 0; i++) {
anchorname[i] = tolower(anchorname[i]);
// Check space
if (anchorname[i] == 32) {
anchorname[i] = 45; // Change space to hyphen
}
// Check allow character. number, letter and hyphen(space)
// All special character will be remove
if ((anchorname[i] >= 97 && anchorname[i] <= 122) || (anchorname[i] >= 48 && anchorname[i] <= 57) || anchorname[i] == 45) {
anchorname[j] = anchorname[i];
j++;
}
}
anchorname[j] = '\0';
}