Java Reference
In-Depth Information
}
}
}
}
iif
(
res
.
length
() ==
0
)
return
return null
null
;
for
for
(
int
int
i
=
res
.
length
();
i
<
4
;
i
++)
res
.
append
(
'0'
);
return
return
res
.
toString
();
}
}
There are apparently some nuances of the full Soundex algorithm that are not implemented
with Unit Testing
)
is also online as
SoundexTest.java
, in the
src/tests/java/strings
directory.
The dedicated reader may use this to provoke failures of such nuances, and send a pull re-
quest with updated versions of the test and the code.
See Also
The Levenshtein string edit distance algorithm can be used for doing approximate string
comparisons in a different fashion. You can find this in
Apache Commons StringUtils
.
I
show a non-Java (Perl) implementation of this alrorithm in
Marrying Java and Perl
.
[
12
]
StringBuilder
was added in Java 5. It is functionally equivalent to the older
StringBuffer
. We
will delve into the details in
Putting Strings Together with StringBuilder
.
[
14
]
Indeed, there are so many characters in Unicode that a fad has emerged of displaying your name
upside down using characters that approximate upside-down versions of the Latin alphabet. Do a web
search for “upside down unicode.”
[
15
]
With the caveat that it doesn't handle different delimiters; this could be added using
GetOpt
and
constructing the pattern around the delimiter.
[
16
]
In Unix terminology, a “daemon” is a server. The old English word has nothing to do with satanic
“demons” but refers to a helper or assistant. Derwin Daemon was actually a character in Susannah
Coleman's “Source Wars” online comic strip, which long ago was online at a now-departed site called
darby.daemonnews.org
.