Functions | |
void | generate_charstring_from_telnr (string telNr[]) |
void | insert_array_indexes_to_charstring (string telNr[]) |
Generates all possible key indexes and inserts them into telNr. | |
int | is_valid_array_index (string telNr, string array_index) |
Check if we can gerate string from integer. | |
int | max_strings (string str) |
Simply replaces chars in string with 4'rs. | |
int | one_string_to_int (string str) |
int | string_to_int (string str) |
Converts string to integer. | |
string | itos (int i) |
Convert integer to string. | |
int | min_strings (string str) |
Simply replaces chars in string with 1'es. | |
void | replace_array_indexes_in_charstring_with_chars (string telNr[]) |
Replaces numbers in array_index strings with characters. | |
string | ctos (char chr[]) |
Character type string to string. | |
void | filter_junk (string telNr[]) |
Removes random strings with the help of dictionary. | |
void | writeout (string telNr[]) |
Writes out array telNr. | |
string | array_index_to_char (string key, string array_index) |
Looks up a character from key. | |
void | stoc (string input, char output[]) |
Changes variable from string to char. | |
Variables | |
string | chars_on_telkey [10][5] |
|
Looks up a character from key. todo. Maby parameters should be integers. |
|
Character type string to string.
|
|
Removes random strings with the help of dictionary. Goes through the array telNr and removes all strings that doesn't exist in words.txt. |
|
|
|
Generates all possible key indexes and inserts them into telNr. So what do I mean by key index? On key 2 we have chars a, b anc c. Key index is alias to every char and they start from 1 on every key. So 1 = a, 2 = b and 3 = c. "1221" was a great band. |
|
Check if we can gerate string from integer. So what do I mean with integer? It's a special string filled with numbers. Each of these tell which character to choose from a key. Which characters are on what key are stored in array chars_on_telkey. |
|
Convert integer to string. Not char type string. |
|
Simply replaces chars in string with 4'rs. So if the input is 123, output is 444. That's the max count of different strings we can generate. |
|
Simply replaces chars in string with 1'es. So if the input is 123, output is 111. That's the min count of different strings we can generate. |
|
|
|
Replaces numbers in array_index strings with characters. Very important function. From a previous examp., if we have a telephone nr 2222 and array_index string 1221 the answer would be abba. |
|
Changes variable from string to char.
|
|
Converts string to integer. Don't confuse this one with function that changes string type char to integer. |
|
Writes out array telNr.
|
|
Initial value:
|