NYSIIS: Difference between revisions

100 bytes removed ,  9 years ago
→‎{{header|Java}}: It doesn't actually make sense to remove last chars iteratively, so that cannot be the intention
m (→‎{{header|Java}}: remove redundant letter)
(→‎{{header|Java}}: It doesn't actually make sense to remove last chars iteratively, so that cannot be the intention)
Line 353:
if (sb.lastIndexOf("AY") == lastPos - 1)
sb.delete(lastPos - 1, lastPos + 1).append("Y");
 
else if (sb.lastIndexOf("AS") == lastPos - 1)
sb.setLength(lastPos - 1);
 
else if (sb.charAt(lastPos) == 'S')
Line 385 ⟶ 382:
}</lang>
 
<pre>MatthewsCarr -> MATCAR
Carr -> CAR
Lawson -> LASAN
ChapmanLouisXVI -> CAPNANLASXV
Greene -> GRAN
Willis -> WALWALA
Mackenzie -> MCANSY
brownsr -> BRANSR</pre>
browneIV -> BRANAV
O'Brien -> OBRAN
LouisXVILynch -> LASXVLYNC
Wheeler -> WALAR
Carlson -> CARLSA[N]
Lawrence -> LARANC
GreeneLarson -> GRANLARSAN
McCormack -> MCARNA[C]
Jacobs -> JACAB
Willis -> WAL
browneIV -> BRANAV
Harper -> HARPAR
browneIII -> BRAN
Mclaughlin -> MCLAGL[AN]
mitchell -> MATCAL
Morrison -> MARASA[N]
o'daniel -> ODANAL
Franklin -> FRANCL[AN]
McDonald -> MCDANA[LD]
knightO'Banion -> NAGTOBANAN
McDaniel -> MCDANA[L]
Larson -> LARSAN
Silva -> SALV
Wheelermitchell -> WALARMATCAL
Richards -> RACARD
Carlson -> CARLSA[N]
browneIII -> BRAN
Matthews -> MATA
knight -> NAGT
Franklin -> FRANCL[AN]
Chapman -> CAPNAN
Bishop -> BASAP
Oo'Baniondaniel -> OBANANODANAL
Watkins -> WATCAN</pre>
McCormack -> MCARNA[C]
Watkins -> WATCAN
Lynch -> LYNC
Mackenzie -> MCANSY
brownsr -> BRANSR</pre>
 
=={{header|Perl 6}}==
Anonymous user