BrightSide Workbench Full Report + Source Code
org.turro.contacts.proposal.Soundex Class Reference

Static Public Member Functions

static int difference (String s1, String s2)
 
static String replacePunctuations (String s)
 
static String replaceSpecialLetters (String s)
 

Detailed Description

Author
Lluis Turró Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 32 of file Soundex.java.

Member Function Documentation

◆ difference()

static int org.turro.contacts.proposal.Soundex.difference ( String  s1,
String  s2 
)
static

Definition at line 37 of file Soundex.java.

37  {
38  s1 = replaceSpecialLetters(replacePunctuations(s1.toLowerCase()));
39  s2 = replaceSpecialLetters(replacePunctuations(s2.toLowerCase()));
40  return differenceWord(s1, s2);
41  }
static String replacePunctuations(String s)
Definition: Soundex.java:43
static String replaceSpecialLetters(String s)
Definition: Soundex.java:51
Here is the call graph for this function:
Here is the caller graph for this function:

◆ replacePunctuations()

static String org.turro.contacts.proposal.Soundex.replacePunctuations ( String  s)
static

Definition at line 43 of file Soundex.java.

43  {
44  return s.replaceAll("[àáäâ]", "a")
45  .replaceAll("[èéëê]", "e")
46  .replaceAll("[ìíïî]", "i")
47  .replaceAll("[òóöô]", "o")
48  .replaceAll("[ùúüû]", "u");
49  }
Here is the caller graph for this function:

◆ replaceSpecialLetters()

static String org.turro.contacts.proposal.Soundex.replaceSpecialLetters ( String  s)
static

Definition at line 51 of file Soundex.java.

51  {
52  return s.replaceAll("ñ", "ny")
53  .replaceAll("ç", "s")
54  .replaceAll("[^A-Za-z0-9]", "");
55  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: