| 248 | |
| 249 | |
| 250 | unsigned int RateCompareString(const AString & s1, const AString & s2 ) |
| 251 | { |
| 252 | unsigned int MatchedLetters = 0; |
| 253 | unsigned int s1Length = s1.length(); |
| 254 | |
| 255 | if( s1Length > s2.length() ) return 0; // Definitely not a match |
| 256 | |
| 257 | for (unsigned int i = 0; i < s1Length; i++) |
| 258 | { |
| 259 | char c1 = (char)toupper( s1[i] ); |
| 260 | char c2 = (char)toupper( s2[i] ); |
| 261 | if( c1 == c2 ) |
| 262 | { |
| 263 | ++MatchedLetters; |
| 264 | } |
| 265 | else |
| 266 | { |
| 267 | break; |
| 268 | } |
| 269 | } |
| 270 | return MatchedLetters; |
| 271 | } |
| 272 | |
| 273 | |
| 274 |
no outgoing calls
no test coverage detected