September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -28,7 +28,10 @@ private static String getCode(char c){
|
|||
public static String soundex(String s){
|
||||
String code, previous, soundex;
|
||||
code = s.toUpperCase().charAt(0) + "";
|
||||
previous = "7";
|
||||
|
||||
// EDITED : previous = "7";
|
||||
previous = getCode(s.toUpperCase().charAt(0));
|
||||
|
||||
for(int i = 1;i < s.length();i++){
|
||||
String current = getCode(s.toUpperCase().charAt(i));
|
||||
if(current.length() > 0 && !current.equals(previous)){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue