NAME

str_dist -- compute distance between strings

PROTOTYPE

unitptr str_dist( unitptr uHost)

ARGUMENTS

unitptr uHost
host unit

RETURN VALUE:

A pointer to the created unit or NULL in the case of an error.

INTERFACE OF CREATED UNIT:

X_in[]:
(text input field 0) first string A
Y_in[]:
(text input field 1) second string B
CTL_in[]:
(control field) if positive, normal operation, if negative = ignore case when comparing strings.
X_out[]:
(output field 0) comparison result

EXECUTION OF CREATED UNIT:

Returns in X_out the number of characters in which the two strings A and B differ. This is taken to be the nr of different characters up to the common length of both strings plus the lenght difference. The result is multiplied by -1 if B is lexicographically before A.

FILE

/local/homes/rhaschke/nst7/man/../o.linx86//../foldersrc/nst_string.c