Anonymous user
NYSIIS: Difference between revisions
→{{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.charAt(lastPos) == 'S')
Line 385 ⟶ 382:
}</lang>
<pre>
Lawson -> LASAN
Greene -> GRAN
Mackenzie -> MCANSY▼
browneIV -> BRANAV▼
O'Brien -> OBRAN
Wheeler -> WALAR
Carlson -> CARLSA[N]▼
Lawrence -> LARANC
McCormack -> MCARNA[C]▼
Jacobs -> JACAB
▲Willis -> WAL
▲browneIV -> BRANAV
Harper -> HARPAR
browneIII -> BRAN▼
Mclaughlin -> MCLAGL[AN]
Morrison -> MARASA[N]
Franklin -> FRANCL[AN]▼
McDonald -> MCDANA[LD]
McDaniel -> MCDANA[L]
Silva -> SALV
Richards -> RACARD
▲Carlson -> CARLSA[N]
▲browneIII -> BRAN
Matthews -> MATA
knight -> NAGT
▲Franklin -> FRANCL[AN]
Chapman -> CAPNAN
Bishop -> BASAP
Watkins -> WATCAN</pre>▼
▲McCormack -> MCARNA[C]
▲Watkins -> WATCAN
▲Mackenzie -> MCANSY
▲brownsr -> BRANSR</pre>
=={{header|Perl 6}}==
|