reference implementation
| 89 | |
| 90 | // reference implementation |
| 91 | uint32_t Soundex::soundex32(const char * str) |
| 92 | { |
| 93 | uint8_t tmp = _length; |
| 94 | _length = 10; |
| 95 | char *p = soundex(str); |
| 96 | _length = tmp; |
| 97 | |
| 98 | uint32_t value = (p[0] - 'A'); |
| 99 | for (uint8_t i = 1; i < 10; i++) |
| 100 | { |
| 101 | value *= 7; |
| 102 | value += (p[i] - '0'); |
| 103 | } |
| 104 | return value; |
| 105 | } |
| 106 | |
| 107 | |
| 108 | // -- END OF FILE -- |