MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / soundex32

Method soundex32

libraries/Soundex/Soundex.cpp:91–105  ·  view source on GitHub ↗

reference implementation

Source from the content-addressed store, hash-verified

89
90// reference implementation
91uint32_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 --

Callers 1

unittestFunction · 0.80

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.64